How to display subpages only if parent is viewed?
-
My page-tree might look like this:
- Page 1
- Subpage 1
- Subpage 2
- Page 2
- Subpage 3
- Subpage 4
I want to display subpage 1 & 2 only if page 1 or subpage 1 or 2 is viewed (like shown below). Is that possible without having to hack wp? If not, could someone help me out with some code?
- Page 1 (this is the page user is browsing)
- Subpage 1
- Subpage 2
- Page 2 (user is not browsing this page, do not display subpages
Edit:
- Page 1
- Subpage 1 (this is the page user is browsing)
- Subpage 2 (user is not browsing this page, but since it is subpage 1’s ‘brother’, it is displayed)
- Page 2 (user is not browsing this page, do not display subpages
Hope you understand what i want.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘How to display subpages only if parent is viewed?’ is closed to new replies.