Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #382649

    I’m trying to use this code:

    add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
    function add_login_logout_link($items, $args) {
    if( $args->theme_location == 'top-menu' ) {
        ob_start();
        wp_loginout('index.php');
        $loginoutlink = ob_get_contents();
        ob_end_clean();
        $items .= '<li>'. $loginoutlink .'</li>';
    }
    return $items;
    }

    However I cannot work out what my main menu is called. It is not ‘top-menu’ as per the above. What is the name of this menu? Thanks

    #382939

    Hi lucybb!

    Thank you for using Enfold.

    It is called “avia”. :)

    Regards,
    Ismael

    #382987

    Yes, that worked! Thank you.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Primary menu hook’ is closed to new replies.