Custom taxonomy menu problem
-
Hi,
I’m experiencing some weird crossovers between my custom taxonomies and the built-in category and tags. I hope someone can help.
I’ve created a custom post type (projects) and a custom taxonomy (sectors) that is exclusive to that post type. Then I created a custom menu (via Appearance -> Menus) that outputs the various sectors and allows the user to view projects by sector. So far so good.
However, the site also contains a blog with the standard posts, categories and tags. The problem arises when you create a category or tag with the same name as one of the sectors. So if I have “Commercial” as a sector, and then create a “Commercial” category or tag, clicking the “Commercial” category / tag calls up all blog posts with that category / tag but also causes the “current-menu-item” class to be applied to “Commercial” in the sectors menu.
This wouldn’t be a big issue by itself (and can be hacked in the CSS) but if I subsequently delete the “Commercial” category / tag, then the “Commercial” sector is removed from the menu (though thankfully it is not deleted from the system).
I hope I’ve explained it clearly and I hope someone can help with this issue as I’m at the tearing-my-hair-out stage. Is this a known bug? Is there a workaround? Should I simply give up on the inbuilt custom menu and build the sector menu myself using get_terms?
- The topic ‘Custom taxonomy menu problem’ is closed to new replies.