Strip Menu Item classes in shiftnav?
-
How can I strip the menu classes in the shift nav menu. I attempted variations of the code here: http://www.wpbeginner.com/wp-tutorials/add-a-custom-class-in-wordpress-menu-item-using-conditional-statements/ to no avail. You can see my issue at http://www.ufaed.org
https://wordpress.org/plugins/shiftnav-responsive-mobile-menu/
-
[class^=icon-]:before, [class*=" icon-"]:before { display: none; }this gets rid of the icons everywhere, but i want to ensure they stay on the other menus.
I have somewhat solved the problem with the following:
@media screen and (max-width: 991px) { [class^=icon-]:before, [class*=" icon-"]:before { display:none; } }but there has to be a better solution.
Hi jturet,
I’m not really sure why you would want to remove the item classes? Doing so would break the menu.
I’m not sure how hiding the icons is related to stripping the classes, but all you’d need to hide the icons would be
.shiftnav .shiftnav-icon{ display:none; }Best,
Chris
Menu classes as in the default classes within the wordpress menu options. They are used in my theme for setting icons in menus. They are not needed in shift nav for setting icons as there is the built in icon selector.
Ah, that makes more sense. Best option would probably be to just use a separate menu for ShiftNav, or else write the CSS for the icons (the ones you’re trying to remove) to only target the main menu rather than ShiftNav. In general, it’s best to just target something specifically rather than apply to all and then try to remove it – but that may not be possible based on how the theme is coded.
Best,
Chris
I think I will just stick with my solution, my menus have tons of role-based conditionals and are quite large. Thank you for your responses.
You’re welcome
The topic ‘Strip Menu Item classes in shiftnav?’ is closed to new replies.