Let’s say you have a Page in your WordPress site, and you’ve added a few child pages to it. Sometimes you might wanna list those child pages easily with a shortcode. This creates that shortcode so you can use: [list_child_pages class="custom-class" parent="parentID"]
For example, you have an “Our Policies” page and below it are some other pages like: Cookie Policy, Privacy Policy, Accessibility Statement, etc.
And you want to display them as a list of pages like this:
or place them in a footer like this:
Well this shortcode let’s you do that. Add this snippet to your site, then you can place the shortcode [list_child_pages]
anywhere. By default, it will list the child pages of the current page, but if you’re using it in a menu, header, footer, or sidebar, you might want to give it the ID of the parent page so that it always lists the correct pages.
Leave a Reply