- This topic has 19 replies, 2 voices, and was last updated 10 years, 4 months ago by
Tom.
-
AuthorPosts
-
November 10, 2015 at 11:59 am #151884
Uwe Pfeifer
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.
November 10, 2015 at 12:00 pm #151887Uwe Pfeifer
want notify so another post.
November 10, 2015 at 12:09 pm #151892Uwe Pfeifer
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).
November 10, 2015 at 4:22 pm #151957Tom
Lead DeveloperLead DeveloperCan 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 🙂
November 10, 2015 at 11:47 pm #152009Uwe Pfeifer
it’s not working im using the child theme
the page is http://www.unityhub.euNovember 10, 2015 at 11:49 pm #152011Uwe Pfeifer
i clicked on editor and added it to functions.php.
November 11, 2015 at 12:06 am #152015Tom
Lead DeveloperLead DeveloperGive this a try: https://gist.github.com/generatepress/f5e4f6d1795cf6bb4c6a
November 11, 2015 at 12:10 am #152020Uwe Pfeifer
It is almost the same. The selection of menu Forums disappears, but now nothing else is selected (not Blog).
November 11, 2015 at 12:13 am #152022Tom
Lead DeveloperLead DeveloperYou 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; }November 11, 2015 at 12:14 am #152023Uwe Pfeifer
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?
November 11, 2015 at 10:25 am #152200Tom
Lead DeveloperLead DeveloperYou 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.
November 11, 2015 at 10:41 am #152215Uwe Pfeifer
it’s still not working i added the CSS to the css editor.
November 11, 2015 at 10:42 am #152218Tom
Lead DeveloperLead DeveloperYou need to change #whatever to the colors you want to use for your current menu items.
November 11, 2015 at 10:42 am #152219Uwe Pfeifer
oh yes of course ;D ill do that now.
November 11, 2015 at 10:46 am #152222Uwe Pfeifer
it works. thank you very much 😀
-
AuthorPosts
- You must be logged in to reply to this topic.