I am trying to create a custom navigation system for my wordpress site.
I have created some parent pages and some sub-pages
I have the following pages
Home ID=1, post_parent=0
Page1 ID=2, post_parent=0
Page2 ID=3, post_parent=0
subpage1 ID=4, post_parent=1
subpage2 ID=5, post_parent=1
subpage3 ID=6, post_parent=2
subpage4 ID=7, post_parent=2
subpage5 ID=8, post_parent=3
subpage6 ID=9, post_parent=3
the field post_parent relates to the ID of the parent page.
I am trying to create two navigation lists.
1. Displays all pages where post_parent=0
2. Displays all pages where post_parent= ID of parent page
for example
if someone clicks on home (id=1) then the second navigation list will display all subpages where post_parent=1, if someone clicks on page 1 (id=2) then the second navigation will display all subpages where post_parent=2 etc. etc.
I have created the first navigation list ok, it is the second I am struggling with.
Can anyone give me any help?
The page ID is passed in the URL as ?page_id=










Bookmarks