0

Suppose I have a site with this menu-structure:

food

  • banana
  • carrot
  • apple
  • lettuce

where the fruit-items belong to fruit and the vegetables belongs to vegetable. Now ultimately I’d like to colour the item’s appearance according to their categories. For that to work, it would suffice to add class=fruit to all members of fruit and the same correspondingly for the vegetables. How would I go about to do that?

1
  • look the HTMl source of the page, in almost all themes, the CSS classes are already in place to do what you want
    – mmm
    Commented Jun 27, 2016 at 17:10

1 Answer 1

0

From the WP-Admin.

Click on Appearance > Menus

In the top right, click "Screen Options"

Select (check) "CSS Classes"

Then you will have added the optional "CSS CLASSES" to each menu item.enter image description here

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.