Full Width Forum Pages
Good day, I am running the latest versions of WordPress and bbPress and would appreciate some assistance with getting my forum’s sub pages full width. I am using Elegant Themes’s Divi theme.
So I can choose to have the main Forum page full with by checking that in the page settins – http://secularsociety.co.za/forum/ but as soon as you go to one of the forum’s sub pages it resizes it back to a page that has a sidebar – http://secularsociety.co.za/forum/topic/ask-an-atheist/. I’ve read and tried a bunch of things without any luck. I am also not a css master, but I am willing to try anything.
Thank you for your time.
You need to get bbpress to use the full width template
Hi there, thank you for the swift response. I am currently using bbpress, as stated above. I read trough and implemented the information you linked me to, but still no luck. Here is the code in my theme’s page.php file. Maybe you can help me since I can not seem to figure out the code 🙂
<?php get_header(); $is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() ); ?> <div id="main-content"> <?php if ( ! $is_page_builder_used ) : ?> <div class="container"> <div id="content-area" class="clearfix"> <div id="left-area"> <?php endif; ?> <?php while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( ! $is_page_builder_used ) : ?> <h1 class="main_title"><?php the_title(); ?></h1> <?php $thumb = ''; $width = (int) apply_filters( 'et_pb_index_blog_image_width', 1080 ); $height = (int) apply_filters( 'et_pb_index_blog_image_height', 675 ); $classtext = 'et_featured_image'; $titletext = get_the_title(); $thumbnail = get_thumbnail( $width, $height, $classtext, $titletext, $titletext, false, 'Blogimage' ); $thumb = $thumbnail["thumb"]; if ( 'on' === et_get_option( 'divi_page_thumbnails', 'false' ) && '' !== $thumb ) print_thumbnail( $thumb, $thumbnail["use_timthumb"], $titletext, $width, $height ); ?> <?php endif; ?> <div class="entry-content"> <?php the_content(); if ( ! $is_page_builder_used ) wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'Divi' ), 'after' => '</div>' ) ); ?> </div> <!-- .entry-content --> <?php if ( ! $is_page_builder_used && comments_open() && 'on' === et_get_option( 'divi_show_pagescomments', 'false' ) ) comments_template( '', true ); ?> </article> <!-- .et_pb_post --> <?php endwhile; ?> <?php if ( ! $is_page_builder_used ) : ?> </div> <!-- #left-area --> <?php get_sidebar(); ?> </div> <!-- #content-area --> </div> <!-- .container --> <?php endif; ?> </div> <!-- #main-content --> <?php get_footer(); ?>
Thanks a mil!
Ok, you’ll need to copy this and rename it bbpress as per the above
As this is a theme file, I’m having to guess a bit about what it is doing, so this may or may not work.
So once you have this as bbpress.php
$is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() );
and replace it with
$is_page_builder_used = TRUE ;
come back and let us know if that works
Hi Robin, that worked… too well 😀 So it is completely full width now – http://secularsociety.co.za/forum/topic/ask-an-atheist, but it is not full width and blocked as the the forum’s home page – http://secularsociety.co.za/forum. In other words the the forum’s sub pages need to resemble the forum’s home page – http://secularsociety.co.za/forum. I am trying my best to also figure out the code, but no luck so far. Thank you so much for all your help, really appreciate it.
Sorry, you’ll need to explain what the remaining issue is – it’s probably obvious to you, but not to me looking at the links.
Please explain rather than just posting links 🙂
Sorry about that 🙂 So the gaol is for the forum’s sub pages, the topic and discussions pages, IE – http://secularsociety.co.za/forum/topic/sass-logo-vote to look exactly like the forum’s main page over here http://secularsociety.co.za/forum. The main forum page (this one http://secularsociety.co.za/forum) is full width, but the forum interface is blocked within the full width page, see image – https://www.dropbox.com/s/rcmc1c0kewu4frb/Screen-Shot-Correct-Layout.jpg?dl=0. The sub pages, the focus of this discussion, are now full width (thanks to your help), but the forum interface is not blocked, see image – https://www.dropbox.com/s/a6o0b8x7sqiuvah/Screen-Shot-Incorrect-Layout.jpg?dl=0. In conclusion, the sub pages need to be full width (as we’ve achieved by duplicating the theme’s full width page.php, reanaming it and changing some of the code), with the forum interface blocked as shown in this image – https://www.dropbox.com/s/rcmc1c0kewu4frb/Screen-Shot-Correct-Layout.jpg?dl=0. Hope this makes sense 😀 Looking forward to your response. Thanks a mil!
that’s a bit of styling needed
margin: 25px !important;
width: 960px !important;
to your theme’s style sheet, or preferably to your child theme
Hey Robin, thanks so much! The code you supplied me with alters the main forum page a bit (the page that we do not want to chage, but use as a model for the topic and discussion pages) and leaves the topic (http://secularsociety.co.za/forum/forum/sass-general) and discussion pages (http://secularsociety.co.za/forum/topic/sass-vision-statement/) aligned to the left. I have been playing around with your code as well as a bunch of other CSS, but I can not seem get the topic and discussion pages to look like the original main forum page :/ I think that we will need to address each page’s CSS instruction individually. Trying to change the CSS in one go seems to have different results on each of these pages. Any further assistance would be greatly appreciated.
ok, just looked and all the pages look fine now except the forum page – is that correct?
bbpress should use the bbpress template for all the pages, so you can’t really css the individuals (or not without tons of code).
How are you going to the initial forum ? is it method 1 or 2 from the following
and whichever try the other !
Once you are consistently wrong on all pages, you can make it consistently right !
- You must be logged in to reply to this topic.