Support » Fixing WordPress » wp_nav_menu and current-menu-item

  • Seems to be an issue (oversight rather) in v3 with custom navigation. If you set up a custom menu, and have your links in the format ‘/page-slug’ instead of ‘http://www.domain.com/page-slug’, the class assignment of ‘current-menu-item’ never gets assigned.

    This is a real pain in the neck, especially when you use a domain such as ‘http://www.domain.dev’ for any development work. It means you have to go back into your custom menu and change all the links again.

    Anyone come up with a fix for this that doesn’t involve hacking the core?

  • The topic ‘wp_nav_menu and current-menu-item’ is closed to new replies.