WordPress.org

Ready to get started?Download WordPress

Forums

Iconic One
[resolved] Show different menus to logged in users (3 posts)

  1. nRaphy
    Member
    Posted 3 months ago #

    Hello

    I'm trying to have multiple menus for the same location when people are registered or not.

    According to this website : http://www.wpbeginner.com/wp-themes/how-to-show-different-menus-to-logged-in-users-in-wordpress/

    I changed my functions.php

    if ( ! isset( $args['show_home'] ) )
    	$args['show_home'] = true;
    	return $args;
    }
    add_filter( 'wp_page_menu_args', 'themonic_page_menu_args' );

    with

    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' );

    but it doesn't work. Any idea?!

    Thanks

  2. Themonic
    Member
    Theme Author

    Posted 3 months ago #

    Ask here http://wordpress.org/support/ this is not the right place for such questions, it's for theme support only.

  3. nRaphy
    Member
    Posted 3 months ago #

    oh ok sorry !
    Thanks for this information.

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.