0

bbPress uses a custom post type called forums. When I click on forums, both forums and the Blog menu items are highlighted as a current-menu-item.

Is there a way to remove the current-menu-item from Blog when the post-type = forum?

1

2 Answers 2

1

I'd try to format my CSS rules accordingly. If you're using body_class() you can always target single-posttype so as a quick example

.single-posttype .current-menu-item { display: none; }

Will hide the current menu item when you're on a specific post type. If this makes sense hehe. Another way would be creating your own navigation menu Walker and running some additional checks inside.

0

i would use jquery

$('#menu-item-xxx').removeClass('current-menu-item');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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