Getting page ID in order to make submenu
-
This might seem elementary but I’m grappling with WP for the first time (though I’m used to PHP and MySQL).
I want to make a sub-menu dependent on the page being viewed so I’m trying this:
<ul><?php wp_list_pages('title_li=&depth=1' ); ?></ul> <ul><?php wp_list_pages('title_li=&child_of='.this_page_or_its_parent_here().'&depth=1' ); ?></ul>
I’ve tried all sorts but can’t find a function for
this_page_or_its_parent_here()
shall I just write it? Surely it exists already?Thanks in advance,
Pete
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Getting page ID in order to make submenu’ is closed to new replies.