Forums

Faulty logic in adding classes to the custom menu (1 post)

  1. Dimitri Vorontzov
    Member
    Posted 12 months ago #

    I just discovered a curious inconsistency in the way WordPress adds custom CSS classes to the Custom Menus.

    If an admin adds a class to a top level menu item, it's added to the <a> tag corresponding to that menu item. However, if an admin ads a class to a submenu, it gets added to a <li> tag.

    This may create a bit of confusion when someone tries to style the menu. It certainly cost me a bit of time to solve the puzzle.

    Perhaps it would be a good idea to clean this up one of the future versions of WordPress?

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 12 months ago by Dimitri Vorontzov
  • This topic is not resolved
  • WordPress version: 3.1.3