List Child Pages Shortcode

Have you ever wanted to add something simple to a page that will allow you to list the child pages of the current page? Well if so, meet the List Child Pages Shortocde.

Today I have been working on adding some information on this site about my WordPress plugins. During the process it became clear that I wanted to list the child pages of my main plugins page on the plugins page to introduce each plugin before being able to click to view more information about each plugin. I also wanted to show an associated image with each.

To do this I developed a really simple little plugin in order to create a shortcode to do just that. Below is what I have come up with:

In your page you simply enter the following shortcode in order to output the child pages list. You can change the images parameter to either true or false to show or hide the child pages featured image.

Obviously you will need to style the resulting HTML in your themes stylesheet.

Published by

Mark Wilkinson

Lead developer & owner at Highrise Digital @highrisedigital. Develops the @wpbroadbean plugins. Former teacher.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s