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.:
* 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!
- The topic ‘List parent and child pages on child page’ is closed to new replies.