I hope everyone had a awesome weekend. I took some needed time to update iheartpagelines.com and also make some aesthetic changes to the overall site. So let me know what you think of the changes.
Today's tutorial was inspired by a question that was asked in the Facebook User group.
A user asked how to hide menu items based on whether or not the user was logged in in or not. There are countless plugins that can be used to accomplish this task.
I personally use one regularly on certain sites where the client wants to hide links but after some digging I found that the PageLines way was far superior and more useful.
The PageLines Method
The PageLines way involves you adding classes to either menu link or sections that you wish to hide based on whether someone is logged in or not.
To hide a menu link or section to someone logged in:
This class will only show the section or menu item if the user is logged out.
To hide a menu link or section to someone logged out:
This class will only show the section or menu item if the user is logged in.
Where to add the classes
Adding the classes to sections is easy all that is required is to copy and paste the class to the custom classes area in the section options.
To have a place to add the classes to the menu items you need to toggle on css classes in the screen options while on the menus page.