Active li class not being added to child pages menu
-
Hi everyone.
I’m trying to get a child menu working for a parent / sub-page set of pages.
I’m using this code to call the pages which works fine to display them but the class is empty when I’m on the sub-page and I need this to be active so I can highlight it in the menu to show thats where the user is.
if ($post->post_parent) $children = wp_list_pages("title_li=&child_of=" . $post->post_parent . "&echo=0"); else $children = wp_list_pages("title_li=&child_of=" . $post->ID . "&echo=0"); if ($children) { ?> <div class="row"> <div id="news-menu" class="span3 border-right"> <ul class="nav nav-tabs nav-stacked uppercase"> <li class="menu-heading"><h6>OVERVIEW</h6> <?php echo $children; ?>
Output to browser is:
<li class=""><a>SYSTEM MANAGEMENT SERVICES</a>
Any ideas why WordPress isn’t outputting the active class?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Active li class not being added to child pages menu’ is closed to new replies.