Created
October 9, 2018 10:45
-
-
Save RiodeJaneiroo/880f4bde20bc16b4ae9aa2600f621284 to your computer and use it in GitHub Desktop.
[Wordpress - wp nav menu] Remove class and ID from li #wordpress #wp_nav_menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('nav_menu_css_class', 'my_css_attributes_filter', 100, 1); | |
add_filter('nav_menu_item_id', 'my_css_attributes_filter', 100, 1); | |
add_filter('page_css_class', 'my_css_attributes_filter', 100, 1); | |
function my_css_attributes_filter($var) { | |
return is_array($var) ? array() : ''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment