Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am working on a site where I have to show custom links and I am using #hashtags for that (if its correct term), and the issue is wordpress applies active classes to those custom links as well (current-menu-item current_page_item), I just want it to apply to full matching urls not partial urls (custom links). And it also applies " menu-item-home" which is also not good, as it should only be applied to homepage only.

Any body got a solution.

I have read this question: Wordpress menu: How to make www.link.com/#name never contain current_page_item class?

and I don't want this solution, as for this i will have to code each link manually which I don't want, as while I am developing I can code it but later when client will do some change and would like to add custom links (this way), and see it not working that will be an issue.

So please provide reliable and valid solution.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.