I’m trying to follow Jason Bradley’s advice on how to style my WordPress menus.
Specifically, I want to insert an icon before my navigation items using Font-Awesome.
I tried putting this code in the Navigation Label field for my “Home” link:
<i class="icon-fixed-width icon-home"></i> Home
However, when I view the page in my browser, it displays the HTML verbatim, it doesn’t interpret the tag, or any other HTML I throw at it, for that matter.
Did WordPress Menus change in 3.6? Am I missing something obvious?
I know that my font-awesome installation works because I am using their icons all over my site. Thanks.
The “Navigation” field is not where you want to place your CSS class. The navigation is what the user will see in the menu, so don’t put any code there.
To enter a custom CSS class to your item, you need to do the following:
Job done! 🙂
Get custom navigation title using page id: