I am also curious to know where my forum site is, so I can point to it in my blog menu.
Neolo7, try setting your permalinks to something other than default. You should at least have %postname%.
To add /forums/ to your menu, use the custom links option. Or create a page and use the [bbp-forum-index] shortcode, then add that page to the menu.
There is a glitch that is not bbpress related, but rather it’s custom post types related. If you theme relies on the class “current_page_parent” to highlight the current page, WordPress things any post type should keep your blog page highlighted, if you have one. Here’s a piece of code you can drop in functions.php to help:
// fix menus
function support_menu_item($menu){
global $post;
if (get_post_type($post->ID) == 'forum' || get_post_type($post->ID) == 'topic' || get_post_type($post_id) == 'reply')
{
$menu = str_replace( 'current_page_parent', '', $menu ); // remove all current_page_parent classes
$menu = str_replace( 'menu-item-169', 'menu-item-169 current_page_parent', $menu ); // add the current_page_parent class to the page you want
}
return $menu;
}
add_filter( 'nav_menu_css_class', 'support_menu_item', 0 );
Be sure to change “169” to the id of your menu item.
Awesome. Thanks for your help.
Hi, I was having the same problem with my forum menu. The blog menu was highlighted as active. The code you posted fixed it, so thanks a million!
Is there any code I can add, so that the individual forums and topics menu also make the forum menu item active? At the moment when I click into a forum or topic, the menu isn’t active.
Thanks!
Thanks a lot, solved all problems at once. But one thing I can’t to do is change permalinks because it will affect all pages and I have thousands of them, so I just used rewrite rule to page with forum in nginx.