You can show different menus to logged in and logged out users, like so:
Doing this with CSS is pretty easy!
Step 1: Enable CSS Classes on Menu Items
Go to Appearance > Menus, click Screen Options in the top right and check CSS Classes. You’ll now be able to add custom classes to any menu item.
Step 2: Add “logged-in” and “logged-out” to the Menu Items
To give logged in users and logged out users different menu options, first add all the menu items you want. Then add “logged-in” to the class box for the menu items you want to show for logged in users and “logged-out” to the menu items you want to be hidden upon login.
Step 3: Conditionally Change the display via CSS
In Genesis, when a user is logged in it adds the class “logged-in” to the body. (Hint: If your theme doesn’t have this already, you can use the body class filter to add it.)
Add this code to the bottom of you styles.css file and voila!
https://gist.github.com/joshuatomasgarcia/1fbe208c57fb83047d7b
Burl Ave says
Any way to make this work with hamburger menu for mobile devices? Mine shows both logged in and logged out menu items on mobile.
Eric Debelak says
You probably have some CSS that is overriding the
display: none;
in your theme. You could try finding that code in your browser’s console and writing more specific CSS for your theme. If you aren’t comfortable with that, you could try changingdisplay: none;
todisplay: none !important;
.