Archived topic
problems: menu & bbpress
18 replies · Started by Uwe Pfeifer on October 17, 2015
i added this:
function generate_remove_bbpress_parent_classes($class)
{
return ( $class == 'current_page_parent' ) ? FALSE : TRUE;
}
add_filter( 'nav_menu_css_class', 'generate_remove_bbpress_parent_class' );
function generate_remove_bbpress_parent_class( $classes )
{
switch (get_post_type())
{
case 'forum':
// we're viewing a custom post type, so remove the 'current_page_parent' from all menu items.
$classes = array_filter($classes, "generate_remove_bbpress_parent_classes");
break;
}
return $classes;
}
How did you add the menu item? Is it a custom link?
I added it as page. I created a page called Forums and added it to the menu.
Ah, that's why.
Add it as a "Custom Link" and just link to the forum (yoursite.com/forums).
