0

i'm a beginner to Wordpress. I have a question is how to get only classes we put in CSS classes box in Navigation Menu? Not all with the default Wordpress classes. The purpose of this is i want to make a FontAwesome icon before each list in Navigation Menu.

6
  • You can simple add <i class="fa fa-home"></i> Home in your navigation labels. This will add icons without any issue. – Robert hue Nov 22 '14 at 6:04
  • Well, that is so simple! Thank you @Roberthue! Really appreciating! – Jane Brye Nov 22 '14 at 6:18
  • Sure no problem. :) – Robert hue Nov 22 '14 at 6:21
  • Where have you added these? I meant in menu items, not on page titles. – Robert hue Nov 22 '14 at 8:01
  • But @Roberthue in the title attributes of source codes, it display like title="&lt;i class=&quot;fa fa-home&quot;&gt;&lt;/i&gt; Home". It look so bad! Any idea? – Jane Brye Nov 22 '14 at 8:09
2

You can do this easy way or hard way. Hard way would be you creating custom functions to remove all menu classes and add FontAwesome icons accordingly.

And easy way would be this.

Go to Appearance > Menus

And add FontAwesome icons in menu items. Like this.

menu

Note: You don't need to change page titles on each page. Just menu labels.

2
  • Sorry, i forgot that i has rewritten wp_nav_menu rules. Thank again for your quick answer and responses! Problem solved. :) – Jane Brye Nov 22 '14 at 8:13
  • That's great! Let us know if you still face any issue. Previously I was also looking for similar solution and was trying to modify menu with Walker Class but then one of my friend suggest this easy-pezy method. :) – Robert hue Nov 22 '14 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.