admin管理员组

文章数量:1023738

how to add fa fa icons customize menu using wp_nav_menu function?

wp_nav_menu( array(
    'theme_location' => 'primary',
    'menu_id'        => 'footer-menu',
    'menu_class'     => 'quick-link',
));

how to add fa fa icons customize menu using wp_nav_menu function?

wp_nav_menu( array(
    'theme_location' => 'primary',
    'menu_id'        => 'footer-menu',
    'menu_class'     => 'quick-link',
));
Share Improve this question edited Apr 19, 2019 at 16:36 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Apr 19, 2019 at 11:32 SonglyricstSonglyricst 12 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

There might be a better way to do this, but I would use jQuery to target the menu items and .addClass(). So, something like:

$( document ).ready(function() {
  $(“.menu-item-one”).addClass(“fa fa-icon”);
); 

There is an option to add your CSS classes to menu.(Here is screenshot)

how to add fa fa icons customize menu using wp_nav_menu function?

wp_nav_menu( array(
    'theme_location' => 'primary',
    'menu_id'        => 'footer-menu',
    'menu_class'     => 'quick-link',
));

how to add fa fa icons customize menu using wp_nav_menu function?

wp_nav_menu( array(
    'theme_location' => 'primary',
    'menu_id'        => 'footer-menu',
    'menu_class'     => 'quick-link',
));
Share Improve this question edited Apr 19, 2019 at 16:36 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Apr 19, 2019 at 11:32 SonglyricstSonglyricst 12 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

There might be a better way to do this, but I would use jQuery to target the menu items and .addClass(). So, something like:

$( document ).ready(function() {
  $(“.menu-item-one”).addClass(“fa fa-icon”);
); 

There is an option to add your CSS classes to menu.(Here is screenshot)

本文标签: how to add fa fa icons customize menu using wpnavmenu function