Hi and thanks for the great plugin!
I’m using it to show only related sub-items and it works great except for posts (maybe because I’ve set my front page to static).
In my themes functions.php I’ve hooked up to “wp_nav_menu_objects” filter to manually set current item for blog pages:
$sorted_menu_items[$i]->current = true
Can you update the plugin to check for the “current” variable, rather than the “current-menu-item” class?
if ( $el->current )
if ( in_array('current-menu-item',$el->classes) )
That way it would be more flexible.
- The topic ‘Current item check’ is closed to new replies.