Information exchange is vital for making the world a better place.
The Internet must grow and I'm here to help.

Add a class to wp_nav_menu() items with URLs included in the current URL

Meta data: posted by Rares on 23 November 2010. Categories: Articles, User Interface, WordPress. 24 comments.

The Problem

We’re all enjoying the benefits and features of WordPress 3.0. Custom menus are awesome and custom post types shatter all capability and imagination limits. A small problem arises when these two features are used in conjunction: the classes applied to navigation menu items only reflect direct inheritance, and entities that have their URLs included in the current URL can’t get highlighted.

Continue Reading