[Support request] Page Template without sidebar for bbpress.php ?

Home Forums Support Page Template without sidebar for bbpress.php ?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #518897
    Jordan

    Hello,

    This is a very nice theme — thanks for creating it. The premium version has been very nice to work with so far.

    I am looking for the simplest and cleanest way to remove the sidebar on all bbpress pages so that all bbpress content shows up in a full width window without any sidebar content. The goal is that all bbpress pages should display with the same appearance that results when the “Content (no sidebars)” option is selected in the GP theme > Edit Page> Layout > Sidebars section of the admin for a single page. Is there a single page template in the theme (that doesn’t load any sidebars) that I can simply copy over to a child theme, and rename bbpress.php to accomplish this ?

    If not, is there another simple solution for this? I am already using a child theme and the snippets plugin but I want to achieve this as cleanly as possible.

    Thanks!

    #519092
    Leo
    Staff
    Customer Support
    #519570
    Jordan

    Thanks so I modified the code suggested and it seems to do the trick.

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

    Can this code be further modified to set the header for all bbpress pages as well?

    #519625
    Leo
    Staff
    Customer Support

    Not sure what you mean by set the header?

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