Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Custom Menu

Home / Forums / Virtue Theme / Custom Menu

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
November 4, 2015 at 9:10 am

I would like to set 2 different topbar menus for logged in and logged out users.
I found on-line solution:

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

but it works for primary menu too. I am using these two menus and wouldlike add this fitcher only to topbar menu.

  • The forum ‘Virtue Theme’ is closed to new topics and replies.