Quantcast
Channel: Martech Zone
Viewing all articles
Browse latest Browse all 1473

WordPress: How to List Child Pages (My Newest Plugin)

$
0
0

Child Pages in WordPress

We’ve rebuilt the hierarchy of sites for several of our WordPress clients, and one of the things we attempt to do is organize the information efficiently. To do this, we often want to create a master page and include a menu that automatically lists all of the pages below it. A list of child pages, or subpages. Unfortunately, there’s no inherent function or feature to do this within WordPress, so we developed a WordPress List Subpages shortcode to add to the clients’ theme’s functions.php file.

Usage is pretty simple:

[listchildpages aclass="" ifempty="No child pages"]Here are our child pages:[/listchildpages]

  • aclass – If you’d like to apply a class in your unordered list, just enter it here.
  • ifempty – If there’s no child pages, you can insert text. This comes in handy if it’s a list of job openings… you could enter “No current openings.”
  • content – This is the content that’s displayed before the unordered list.

Additionally, if you’d like a short excerpt describing each page, the plugin enables excerpts on pages so that you can edit that content on the page’s settings.

I finally got around to pushing the code into a plugin to make it easier to install and utilize, and the List Child Pages Shortcode plugin was approved by WordPress today! Please download and install it – if you like it provide a review!

WordPress Plugin for Listing Child Pages

Download a Sponsored Marketing Whitepaper:
Engagio's Clear and Complete Guide to Account Based Marketing

Engagio's Clear and Complete Guide to Account Based Marketing

Everything you need to know about winning the biggest deals Download Now

The post WordPress: How to List Child Pages (My Newest Plugin) appeared first on MarTech.


Viewing all articles
Browse latest Browse all 1473

Trending Articles