• Resolved kasparsj

    (@kasparsj)


    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 )
    instead of:
    if ( in_array('current-menu-item',$el->classes) )

    That way it would be more flexible.

    Cheers,
    Kaspars.

    https://www.ads-software.com/extend/plugins/advanced-menu-widget/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Current item check’ is closed to new replies.