WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Menu Widget
[resolved] Current item check (2 posts)

  1. kasparsj
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/advanced-menu-widget/

  2. JohnnyPea
    Member
    Plugin Author

    Posted 11 months ago #

    Thanks for the tip. Implemented in v0.3.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.