current-cat-ancestor class?
-
I am using the wp_nav_menu with a custom ‘fallback_cb’ for category menu and sub menu which is great to just two levels.
<!-- main category menu --> <?php wp_nav_menu( array( 'container_class' => '','theme_location' => 'none','fallback_cb'=>'digimag_top_categories') ); ?> <?php wp_nav_menu( array( 'container_class' => '','theme_location' => 'none','fallback_cb'=>'digimag_child_categories') ); ?> <!-- Sub Category Menu if any exist -->
For a magazine / news theme I need three levels like Sports > Football > “Premier League”
So I need the parent “Football” and the ancestor “Sports” both highlighted in the main category menu and the sub-category menus for “Premier League” or it’s children.
Anyone know the code or a tutorail to add a category ancestor class to wp_nav_menu?
David ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘current-cat-ancestor class?’ is closed to new replies.