I just wanted to add this…
I was looking for something like this from Codecanyon.
http://codecanyon.net/item/menu-by-user-role-for-wordpress/3127921
Except I’m not using Theme Locations for my menus.
An “Apply To All” would be useful!
Thanks for listening!
Maybe, but not immediately. In the interim you can use theme locations and conditional logic.
Register multiple menus:
register_nav_menus( array(
'primary' => 'main menu',
'primary-loggedin' => 'main menu for logged in visitors',
) );
and then use conditional logic to display the menu that is relevant
if( is_user_logged_in() ){
wp_nav_menu( array( 'theme_location' => 'primary-loggedid' ) );
} else {
wp_nav_menu( array( 'theme_location' => 'primary' ) );
}
Hi!
Love this plugin, but right now I’m only looking to change entire menus like Noahj and found this small plugin. Also excellent stuff! Check it out:
http://www.cozmoslabs.com/11911-wordpress-plugin-for-dynamic-menus-based-on-logged-in-status/
Thanks for the link @angslycke!
Maybe Helga or you or someone else can chip in on this.
I still use Nav Menu Roles of course.
For one membership site though and in the focus load performance would it be better to choose a whole menu to load instead of multiple checks divided up in one menu to decide what menu items to show?
I’m not a coder and I have a client with a membership site that has roughly 80 different menu items all based on membership levels.
At first I was thinking it would be less easy to manage using multiple menus with some of the menu content overlaps. But overtime, I am now thinking that it would be better to choose just one menu to per user/role and just manage the multiple menus.
Thoughts?
Someone would have to benchmark it, but if you have a LOT of different users and a LOT of varying menu items, it would probably be better to have multiple menus. If nothing else, I think that would be easier to manage.
I’m not sure about performance effects since WordPress does so many things and checks anyway. Probably it wouldn’t be noticeable. It is a lot easier to manage though!
Thanks angslycke, appreciate it!