Create a menu for each type of user in Dashboard >> Appearence >> Menus >> create a new menu (eg http://example.com/wp-admin/nav-menus.php?action=edit&menu=0)
Then add a function to your theme’s functions.php to switch the menus. Something like as follows:
add_filter('wp_nav_menu_args', 'wp_nav_menu_args_filter');
function wp_nav_menu_args_filter($args = array()) {
if (is_user_logged_in) {
// Menu for Logged In Users
$args['menu'] = "name-of-user-menu";
return $args;
} else {
// Default Menu
return $args;
}
}
Related Posts:
- Override WordPress user with Oauth2 account
- Where the Nickname is being used in WordPress
- User-Specific Timezones? Hack? Plugin?
- Loading posts associated only to the logged in user on recent posts page
- How can i force Display names to be the same as Usernames?
- Custom wp_nav_menu output (displaying all child elements of top menu element in current branch)
- How to create custom LOGIN and REGISTRATION forms?
- Removing user contact methods works from functions.php but not from a plugin
- How can I let users to access plugin functions based on roles?
- Get User ID from within a plugin
- Is it possible to block subscriber users to changing its password?
- wp_nav_menu(); Outside WordPress installation
- delete_user_meta Delete one value out of array
- WordPress Plugin for One-Time Event Registration? [closed]
- Will WordPress username displayed somewhere in the site?
- How do I make a wordpress plugin with menu item etc
- Popup Maker nav menu item not working
- Upload files programmatically to users
- Creating a menu page in a Object Oriented developed plugin
- How to expire all wordpress user passwords instantly?
- Mass Import Users without sending new user notification
- Current user in plugin returns NULL
- Include Max mega menu Plugin into theme
- How use %like% in sql statement wordpress
- Two people sharing user in WordPress [closed]
- Wondering what these multi-colored extra pages are?
- Menus, but not by theme location
- How to make a customize role and view a specific plugins base on that role?
- How to get current post user id
- WordPress Central User Database
- How to read individual user’s directory and display content to that specific user?
- How to get the element ID from new menu list that added with add_filter()?
- How to create restrict content to users (by user, not by role)
- Enable users to change change and add taxonomies of posts
- How can I change the meta_key for a particular piece of information?
- Changing page URL and connect newsletter to MailChip
- Center and hide overflow of WP toolbar custom links
- Understanding State in WordPress Multisites
- How to have sample page for each new register users in a membership website
- Hide a Menu Item on Login
- How to get menu location in wp_update_nav_menu hook
- PHP script from functions php is loaded via admin-ajax to div…and the result is 0, not the desired content
- Add Content to Content()
- Is there a plugin for WordPress for creating ‘Accounts’ where all users who belong to that Account can only see Account data? [closed]
- Progmatically adding menu links to the default (Top) or Footer menu
- Add User Role: Pre-saved in User-Meta [SOLVED]
- get_users(); Is an Undefined Function When Used in Cron Job
- $pages = get_pages(‘child_of=’.$post->ID); Why arguments are concatenated?
- How limit user connection?
- How to pass a query string to another page on the same site?
- WordPress /users/me endpoint request forbidden
- How can I add a fixed vertical menu to my site? [closed]
- Hook on creating a menu entry?
- Plugin permissions for Editor role
- How to auto strip hyperlinks & images in wordpress post
- Role based permission edit for plugins
- navigation among single posts
- Plugin privelages for “editors”
- Shortcode not displaying HTML within the function
- Janrain/Simple Modal under Redirected Domain
- Disable Author Archive just for certain roles in bulk
- Button and Countdown overlapping mobile menu
- Slideout submenu in mobile
- WP Forms not displaying,becomming an fatal error
- Can we hide a certain user in WP?
- WordPress Dashboard add user password not working, etc
- After reading 3 story by user ask for subscription popup
- Add custom WordPress admin page with pretty url via code
- I need to show side menu in wordpress
- Create survey that redirects to sidebar menu customized to answers
- How To Export User’s Custom Fields in CSV or XLSX
- On button click, redirect users to registration page instead of another page
- Searchable Semi Random Number Generator on User Profiles
- How do I run my custom function in my plugin when a wordpress user is deleted?
- Page Contents showing in Footer Area
- User / membership Plugin [closed]
- How to see in Edit Comments if comment is from User and her Roles
- Custom User Notice Upon Login
- How can I save cookies to members
- How to order users alphabetically by name? in plugin UPME
- Defined user role to access plugin’s pages
- How to assign plugin to top level menu?
- WP Super Large Menu Problem
- How to build a navigation menu for long-form texts like this one
- Automatically add child pages to menu
- How to add plugin activity in the menus?
- how to change/remove/hide menu under installed plugins
- Category archive in menu
- Redirect url in plugin to somewhere else?
- Convert usernames listed by the Groups plugin shortcode to displayed names?
- Displaying custom profile fields using Mingle Plugin
- How to activate/deactivate menu tab and keep the same id?
- How can I add different menus (different style menu) on each page?
- WordPress User Portal
- How to validate password length in wordpress
- Why plugin’s icon for the menu not found?
- How does one add numbers to an admin menu?
- Adding fontAwesome to Primary Menu returns after saving the menu
- Prevent primary navigational menu from expanding during page load (WordPress / Astra Theme)
- Issues with creating user profile for a subscriber, but with different profile page and functionalities