| Posted by: DogMan - 03 April 2026 14:05:06 |
|---|
| How can I have two different menus in wordpress for whether a user is logged in or not? |
| Posted by: sirclesadmin - 03 April 2026 14:06:20 |
|---|
|
Since you are already using GeoDirectory and AyeCode Connect, you have a few ways to handle this. You can either swap the entire menu or just hide/show specific links within a single menu. Here are the three best ways to do it: 1. Using a Plugin (The "No-Code" Way)The most popular and reliable plugin for this is Conditional Menus (by Themify).
2. Using "If Menu" (To keep one menu but hide items)If you only want to change 1 or 2 items (like swapping "Login" for "My Dashboard"), the If Menu plugin is better.
3. Using a Code Snippet (Lightweight & Clean)If you prefer not to add another plugin, you can add this to your theme's
> Note: Make sure the names 'Logged In Menu' and 'Logged Out Menu' exactly match the names you gave your menus in the WordPress settings. Which should you choose?
Since you've got GeoDirectory running, you might also check your UsersWP settings (if you have that installed)-it often has built-in options to toggle login/logout links automatically! Do you want the entire menu to change, or are you just looking to swap out a couple of specific links? |