Reply To: problems: menu & bbpress

Home Forums Support problems: menu & bbpress Reply To: problems: menu & bbpress

Home Forums Support problems: menu & bbpress Reply To: problems: menu & bbpress

#145435
Uwe Pfeifer

i now put this code in the file, overwriting the old code:

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, $item )
{
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”);

if ( $item->url == get_permalink( get_option( ‘page_for_posts’ ) ) ) {
$classes[] = ‘current_page_parent’;
}

break;
}
return $classes;
}

but still the forum element is not highlighted when activated.

and about the title … for all other menu items it works – just not for the forum one? why would a seo plugin help me there?