[Resolved] bbpress and Sidebars

Home Forums Support [Resolved] bbpress and Sidebars

Home Forums Support bbpress and Sidebars

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #144274
    Dominik Günder

    Hello Tom,

    i encounter some strange issue regarding bbpress and the sidebar widgets in generatepress using the subtheme forefront.

    I have set the widget sidebars to disappear for the forums mainpage here:
    http://home.guender.net/forum/

    But still both sidebars are displayed, what ever option i set in the generatepress page options. (Page option: Content (no sidebars)

    If i do this on any other page it works just good. Is there any possibility to stop bbpress from overwriting this?

    Best regards,
    Dominik

    #144317
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    WordPress treats bbPress (and other custom post types) as a blog, so the blog sidebar layout applies for bbPress.

    To override this, you can use a function like this:

    add_filter( 'generate_sidebar_layout','generate_custom_bbpress_sidebar_layout' );
    function generate_custom_bbpress_sidebar_layout( $layout )
    {
     	// If we are on a category, set the sidebar
     	if ( is_bbpress() )
     	 	return 'no-sidebar';
    
     	// Or else, set the regular layout
     	return $layout;
    
     }

    Let me know if that helps or not 🙂

    #144504
    Dominik Günder

    Worked perfectly! Thank you again for the great support – Even tho this was not a theme related issue 🙂

    #144623
    Tom
    Lead Developer
    Lead Developer

    No problem! 🙂 Glad we could get it working.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.