Warning: Undefined array key "ssba_bar_buttons" in /home/clients/bdfd9f990f835530646422d2d77dd09c/web/blog/wp-content/plugins/simple-share-buttons-adder/php/class-buttons.php on line 602
Warning: Undefined array key "ssba_bar_buttons" in /home/clients/bdfd9f990f835530646422d2d77dd09c/web/blog/wp-content/plugins/simple-share-buttons-adder/php/class-buttons.php on line 602
Warning: Undefined array key "ssba_bar_buttons" in /home/clients/bdfd9f990f835530646422d2d77dd09c/web/blog/wp-content/plugins/simple-share-buttons-adder/php/class-buttons.php on line 602
Warning: Undefined array key "ssba_bar_buttons" in /home/clients/bdfd9f990f835530646422d2d77dd09c/web/blog/wp-content/plugins/simple-share-buttons-adder/php/class-buttons.php on line 602
Méthode 1
Ajouter dans le fichier functions.php:
function wpb_first_and_last_menu_class($items) { $items[1]->classes[] = 'first'; $items[count($items)]->classes[] = 'last'; return $items; } add_filter('wp_nav_menu_objects', 'wpb_first_and_last_menu_class');$
Méthode 2
Uniquement en CSS, avec les sélecteurs spécifiques (attention à la compatibilité avec les vieux navigateurs):
ul#yourmenuid > li:first-child { } ul#yourmenuid > li:last-child { }
Laisser un commentaire