Faulty logic in adding classes to the custom menu
-
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?
- The topic ‘Faulty logic in adding classes to the custom menu’ is closed to new replies.