1

is there a way to allow admin users to add classes to individual menu items in the back end? we have done some individual javascripting and CSS using the title tag, but that is not flexible as it is visible to the end user, so the method is not suited effects needed to be applied to multiple items.

1 Answer 1

6

This is natively supported by WordPress. In the menus page, click "Screen Options" (in the upper right corner):

Screen Options

Then check "CSS Classes":

Check CSS Classes

You will now have a "CSS Classes" Option for each menu item:

Enter CSS Classes

3
  • Very nice. I never looked at the screen options for that page. Nov 3, 2010 at 15:55
  • awesome, can we we set this problematically?
    – Mild Fuzz
    Nov 4, 2010 at 14:16
  • @Mild Fuzz: Take a look at the DB options table and set it to true on init (should be some autoloaded option).
    – kaiser
    Feb 23, 2011 at 1:22

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.