Archived topic
Again problem with bbPress
19 replies · Started by Uwe Pfeifer on November 10, 2015
Hi!
The menu item Forum is moved to blog while clicking through the forums.
Here a video:
https://www.youtube.com/watch?v=OBzfKm_SZCs
I had this wrong selected menu item already. I think it somehow got removed. But now I can't find the old post anymore.
Can you help me again? I'm now using the ChildTheme of Generate Press.
want notify so another post.
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;
}
I added this, but still the thing on the video happened (it already was added).
Can you remove what you've added and re-add this?: https://gist.github.com/generatepress/f5e4f6d1795cf6bb4c6a
I've tested it and it works as it should.
If it's not working, can you link me to the page?
Thanks :)
it's not working im using the child theme
the page is http://www.unityhub.eu
i clicked on editor and added it to functions.php.
Give this a try: https://gist.github.com/generatepress/f5e4f6d1795cf6bb4c6a
It is almost the same. The selection of menu Forums disappears, but now nothing else is selected (not Blog).
You mean while you're in the forum/topics? This is a bbPress issue they'll need to address.
You can apply the current CSS to the menu item while in bbPress though:
.bbpress #menu-item-44 a {
background-color: #whatever;
color: #whatever;
}
how do i apply that "when in bbpress"?
btw, what's causing this? is it because i have my frontpage set to activities (to a page)? or does it also happen if my blog posts are the frontpage?
You just add the CSS I gave above and change the colors - the .bbpress part targets bbPress pages.
This will happen regardless - it's a bug in bbPress that they haven't fixed.
it's still not working i added the CSS to the css editor.
You need to change #whatever to the colors you want to use for your current menu items.
oh yes of course ;D ill do that now.
it works. thank you very much :D
