En utilisant un filtre WordPress:

//Ajout de class css spécifiques dans menu de navigation WordPress
function my_special_nav_class( $classes, $item ) {
if ( $item->title == 'menu-item' ) {
$classes[] = 'class css';
}
return $classes;
}
add_filter( 'nav_menu_css_class', 'my_special_nav_class', 10, 2 );

Leave a Reply

Your email address will not be published. Required fields are marked *