• I use:
    add_filter('wp_nav_menu_items', 'add_item_in_primary_menu', 10, 2);

    And I know I could use if ( 'primary' !== $args->theme_location ) if I want to add custom items to a specific menu location.

    But I want to add custom items to a specific WALKER, not to a specific menu.
    How could I do that?

    if(My_Walker_Nav_Menu() == $args->walker) or if("My_Walker_Nav_Menu" == $args->walker) does not work at all.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to Add Custom Items to Specific Walker’ is closed to new replies.