• The function call wp_get_nav_menu_items( array(‘menu’ => ‘Top Nav’)) will return an array of menu items in the menu ‘Top Nav’ if it exists. But it does not return information on which menu item is the currently selected item, that is to say, which item will be granted the class ‘current-menu-item’.

    What function can be relied upon to return information that includes which item is current in the main menu, as I need this to attribute a ‘current-alt-menu-item’ class (with attendant css) to an alternative menu presentation.

    Many thanks,
    John

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Find the current-menu-item’ is closed to new replies.