Read many posts regarding this but all are for all menu items.

Issue is: I want to wrap some text in menu item. I tried adding HTML to menu but that does not work because of Walker_Nav_Menu class which is already added and the menu item is filter by the_title. So that does not work.

I want submenu item like this if some item has text sale,like Summer Sale so sale should be in red. So I want to add span to this menu item text.

is it possible to add text to menu items like this?

1 Answer 1


I just added span and it worked very well

enter image description here

Check result

enter image description here

  • Yes, this works with the normal wp_nav_menu. Thats why I mentioned I am using Walker_Nav_Menu class. This is removing the html from the menu level
    – Sachin
    Jul 1, 2017 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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