Conditional links
-
Preferring something simpler to the standard WP menus, I’m using a conditional statement to add a ‘current’ highlight to a hard-coded page menu.
I can get things working ok on a page and its parent, by using
if ( is_page('programs') || '117' == $post->post_parent )' [where 117 is the page ID]But on lower-level pages the highlight is absent, and so I need to revise that code to cover all child pages of that parent, (and highlight the grandparent?) but have no idea how to.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Conditional links’ is closed to new replies.