Avada Forums Community Forum Top menu and main menu

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • easierone
    Post count: 36

    I chose header styling option no 3. It is green bar with contact and social info, and below is logo and menu next to it.

    When i choose header content 1 – navigation (instead of contact info) it is my top menu. But then header content 2 – have only option to chose exact same menu (top menu). I would like to use main menu, but there is no option. Is there anyway to change it in code?

    Post count: 36

    I figured out that’s happen beacuse of this line:

    function my_wp_nav_menu_args( $args = ” ) {

    if( is_user_logged_in() ) {
    $args[‘menu’] = ‘logged-in’;
    } else {
    $args[‘menu’] = ‘logged-out’;
    return $args;
    add_filter( ‘wp_nav_menu_args’, ‘my_wp_nav_menu_args’ );

    i added to my functions.php to shows different types menus in top bar for logged in and logged out user. How can i add main menu to it?

    Michael C
    Post count: 540

    I suggest checking the filter documentation here – https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_nav_menu_args

    In particular, if you just want to target a specific menu location you will want to do a check against $args[‘theme_location’].

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.