Support » Fixing WordPress » List parent and child pages on child page

  • Calling all uber WordPress/PHP hackers! I’ve got a problem that seems really difficult to be solved. I’m hoping one of you can point me in the right direction.

    I like to divide my site into ‘sections’ using WP’s pages and sub-pages feature. A section is the parent page and all of its child pages. E.g.:

    Fruits Section
    * Apple page
    * Orange page
    * Banana page

    I want to create a list of links to all the pages in a section (including the parent page) EVEN ON THE CHILD PAGES. i.e. I want the example above to appear even on a child page like the Apple page. The above should also only appear WHILE IN THE FRUITS SECTION, and not appear on the About page or any other page.

    The sample code on the wp_list_pages page works halfway because it doesn’t appear on other pages, but does not show a link to the parent page.

    At the moment I’m using ugly conditionals but I’m hoping someone can show me a more elegant piece of code or plugin to take care of this. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, did you every find an answer to this question? I have been searching for an answer now for a while. I have seen wordpress sites that function in this manner.

    Joel Goodman


    Has anyone seen a solution to this? I need to do the same.

    Basically, on a Page I have wp_list_pages showing the child level pages, but can’t figure out how to have the current (child) page’s parent display at the top of the list.

    Any help or a point at a previously resolved thread would be really appreciated. This is the only closely related thread showing up in search.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘List parent and child pages on child page’ is closed to new replies.