-
-
Save brentini/12000b27596b9b3ac7463bee95578e61 to your computer and use it in GitHub Desktop.
Custom class menu item WordPress #wordpress
This file contains hidden or 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
<?php | |
function rs_menu_classes( $classes, $item, $args ) { | |
if($args->theme_location == 'primary') { | |
$classes[] = 'list-inline-item'; | |
} | |
return $classes; | |
} | |
add_filter( 'nav_menu_css_class','atg_menu_classes',1,3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment