list pages and subpages by section (child_of and ?)
-
I have pages 3 levels deep. I’d like to list all pages above the current level as well as the pages in the level and the pages directly under that page. I can’t figure it out. I can get the children of the page or I can get every page, but I can’t get just the pages in a section. That sounds awfully confusing, so let’s make a little page structure/visual example…
Site Map
– People
– Places
– – Here
– – There
– Things
– – shiny things
– – – tin foil
– – – mirror
– – – magic stone
– – ugly things
– – scary things
– – – my neighbor’s cat
– – – bumpy knightsAs it is now, if you were on the tin foil page, you’d not see anything in the side bar. If you went up a level, to shiny things, you’d see tin foil, mirror, & magic stone in the sidebar. What I want is for people on the tin foil page to see…
– People
– Places
– Things
– – Shiny things
– – – Tin Foil
– – – Mirror
– – – Magic Stone
– – Ugly Things
– – Scary ThingsAnd, let’s say they went to the Places Page, I’d want them to see:
– People
– Places
– – Here
– – There
– ThingsPretty basic Menu101 sort of stuff, right. Why can’t I figure this out then?! I should at least be in Menu102 by now ?? I’m sure it’s right there and I just can’t see it, but I’ve searched, I’ve been through the codex, I’ve messed with the code and nothing seems to want to play nicely.
Here’s the latest working code: wp_list_pages(‘child_of=’ . $id . ‘&title_li=
Is there a sibling tag? A grandparent tag? An everything next to, above you, and beneath you tag? That’s the one I want… next to, above, & below.
Thanks for the help!
- The topic ‘list pages and subpages by section (child_of and ?)’ is closed to new replies.