• I need to add a template to my theme so that it appears in the drop-down list when making a new page. It needs to be identical to the standard page template EXCEPT that it should display a bullet-point list of all its child pages below whatever else is on the page.

    An example of what I’m trying to achieve is here:
    http://mrkeefe.co.uk/year-11-p2/electricity/

    Except I’m not using a theme that has this function already built in.

    I’m a WP hacking rookie so please go gently on me – I will act immediately on advice!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try creating a custom page template based on your theme’s default page.php file and include wp_list_pages to show the sub-page list.

    Thread Starter webnik

    (@noisedude)

    That’s great, thanks. Now that I’ve tried a few options out, I might stick the “generate a list only if there are child Pages (that designate the current page as a Parent)” code into the page.php file and let it take care of itself rather than select the new template for every single page.

    Useful exercise in learning how to make a new page template though! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Parent page template’ is closed to new replies.