Show Higher Level Pages with wp_list_pages
-
I’m working on a sidebar navigation menu. I have a three level hierarchy (parent -> child -> grandchild) and I am trying to do the following:
- If the current page is a parent page, only show all parent pages.
- If the current page is a child page, only show all child pages for that parent, and all parent pages.
- And if the current page is a grandchild page, show all grandchildren for this child page, show all child pages for this parent, and show all parent pages.
This is a good case for wp_list_pages but I cannot figure out the how to get this done with PHP. Here is a link to my test site that shows the page behavior the way I would like it to work.
Any help is appreciated of course.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Show Higher Level Pages with wp_list_pages’ is closed to new replies.