Cyber Week Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

[Resolved] bbpress and Sidebars

Home Forums Support bbpress and Sidebars

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #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:

    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,

    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 🙂

    Dominik Günder

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

    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.