WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

wp_nav_menu doesn't add the current-menu-item CSS class when there is an url parameter in the url. Is there a way to ignore the url parameter?

share|improve this question

closed as unclear what you're asking by Pieter Goosen, Johannes Pille, ialocin, gmazzap, Wyck Sep 6 '14 at 16:31

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

URL parameter such as www.domain.com/about/?test=true because it should work. It's hard to tell what the problem is based on the information you've provided so I'd go through the steps of reverting to vanilla WordPress (disabled all plugins, remove customization, etc.) to figure out what's causing it. – Howdy_McGee Aug 21 '14 at 13:57
up vote 0 down vote accepted

I found the problem: I used a 'link' menu item instead of a 'page' menu item because it was originally a post type archive (but I changed that in a page). If I use a 'page' menu item the current-menu-item CSS class does work when there is an url parameter in the url.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.