Skip to:
Content
Pages
Categories
Search
Top
Bottom

Full Width Forum Help


  • watstyl08
    Participant

    @watstyl08

    Hey everyone,

    I’m having a bit of trouble getting my Forum into full-width format. I’m using the Oxygen theme which by default has a left and right sidebar.

    I’ve already copied my “page-template-fullwidth.php”, renamed it as “bbpress.php”, and installed bbPress WP Tweaks to make sure that bbPress is injecting itself into the “bbpress.php” template.

    Given what I’ve read – this should’ve done the trick. I’m wondering if it’s something weird with Oxygen Theme’s templates. I’ve included the code of the Full Width Template i’m using here below. Does anyone see anything out of the ordinary that could be preventing me from getting full-width formatting?

    <?php
    /**
    * Template Name: Full Width
    *
    * Full width page template with no sidebar.
    *
    * @package Oxygen
    * @subpackage Template
    */

    get_header(); // Loads the header.php template. ?>

    <div class=”aside”>

    <?php get_sidebar( ‘primary’ ); // Loads the sidebar-primary.php template. ?>

    </div>

    <?php do_atomic( ‘before_content’ ); // oxygen_before_content ?>

    <div class=”content-wrap”>

    <div id=”content”>

    <?php do_atomic( ‘open_content’ ); // oxygen_open_content ?>

    <div class=”hfeed”>

    <?php if ( have_posts() ) : ?>

    <?php while ( have_posts() ) : the_post(); ?>

    <?php do_atomic( ‘before_entry’ ); // oxygen_before_entry ?>

    <div id=”post-<?php the_ID(); ?>” class=”<?php hybrid_entry_class(); ?>”>

    <?php do_atomic( ‘open_entry’ ); // oxygen_open_entry ?>

    <?php echo apply_atomic_shortcode( ‘entry_title’, ‘[entry-title permalink=”0″]’ ); ?>

    <div class=”entry-content”>

    <?php the_content( __( ‘Continue reading <span class=”meta-nav”>→</span>’, ‘oxygen’ ) ); ?>

    <?php wp_link_pages( array( ‘before’ => ‘<p class=”page-links”>’ . __( ‘Pages:’, ‘oxygen’ ), ‘after’ => ‘</p>’ ) ); ?>

    </div><!– .entry-content –>

    <?php echo apply_atomic_shortcode( ‘entry_meta’, ‘<div class=”entry-meta”>[entry-edit-link]</div>’ ); ?>

    <?php do_atomic( ‘close_entry’ ); // oxygen_close_entry ?>

    </div><!– .hentry –>

    <?php do_atomic( ‘after_entry’ ); // oxygen_after_entry ?>

    <?php do_atomic( ‘after_singular’ ); // oxygen_after_singular ?>

    <?php endwhile; ?>

    <?php endif; ?>

    </div><!– .hfeed –>

    <?php do_atomic( ‘close_content’ ); // oxygen_close_content ?>

    </div><!– #content –>

    <?php do_atomic( ‘after_content’ ); // oxygen_after_content ?>

    <?php get_footer(); // Loads the footer.php template. ?>

Viewing 25 replies - 1 through 25 (of 51 total)

  • Robin W
    Moderator

    @robin-w

    I’d take out the line

    <?php get_sidebar( ‘primary’ ); // Loads the sidebar-primary.php template. ?>

    as that is loading a sidebar !


    watstyl08
    Participant

    @watstyl08

    Thanks for your response! I’ve done that – and it takes the sidebar away, but no luck on getting bbpress to go full-width.

    At least with that small modification to my bbpress.php, I know bbPress is pointed to the right template — now I just need to figure out what code is preventing the full-width format.

    Link to my forum:

    http://www.ibeacon.com/forums/


    Robin W
    Moderator

    @robin-w

    try taking out the three lines

    <div class=”aside”>
    
    <?php get_sidebar( ‘primary’ ); // Loads the sidebar-primary.php template. ?>
    
    </div>
    

    That div class is probably creating a space for the sidebar


    watstyl08
    Participant

    @watstyl08

    Hmm,

    Took those lines out and I’m still not getting the full-width layout.


    Robin W
    Moderator

    @robin-w

    ok, this is not my strong area, but try making this as your bbpress.php page

    
    <?php 
    
    get_header(); // Loads the header.php template. ?>
     
    	<?php if ( is_bbpress() ) { ?>
     
    		<header class="entry-header">
    			<h1 class="entry-title"><?php single_post_title(); ?></h1>
    			<?php echo apply_atomic_shortcode( 'entry_byline', '<div class="entry-byline">' . __( 'Published by [entry-author] on [entry-published] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', 'spine2' ) . '</div>' ); ?>
    		</header><!-- .entry-header -->
     
    		<?php while( have_posts() ): the_post(); ?>
     
    			<?php the_content(); ?>
     
    		<?php endwhile; ?>
     
     
    		<footer class="entry-footer">
    			<?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '[entry-terms before="Posted in " taxonomy="category"] [entry-terms before="| Tagged "]', 'spine2' ) . '</div>' ); ?>
    		</footer><!-- .entry-footer -->
     
    	<?php } else { ?>
    	<div id="content" class="hfeed">
     
    		<?php get_template_part( 'loop-meta' ); // Loads the loop-meta.php template. ?>
     
    		<?php get_template_part( 'loop' ); // Loads the loop.php template. ?>
     
    		<?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template. ?>
     
    	</div><!-- #content -->
     
    <?php get_footer(); // Loads the footer.php template. ?>

    aussiestar14
    Participant

    @aussiestar14

    Hey,
    I am having the same problems with my oxygen theme as mentioned above!!
    I created a forum page with shortcode and choosed there the fullwith template.
    This works great:
    http://www.curlyhorse.info/forum

    • I’ve copied my “page-template-fullwidth.php”
    • renamed it as “bbpress.php”
    • installed bbPress WP Tweaks
    • tried the code for the bbpress.php of Robin W (above)

    But the whole forum doesn’t work now anymore with the new code, if you click on a forumpage like “dies-und-das

    Can anyone help??
    Thanks a lot!!!!


    Robin W
    Moderator

    @robin-w

    ok, you are using the oxygen theme as well?


    @watstyl08
    never came back and said that the code worked, and is now using a three column forum, so don’t know.

    Ok, I’d go back to the original fix, that is copy the oxygen full width template as @watstyl08 did in their very first post, and then take out the three lines as I suggested.

    Once you have done that, come back, and I’ll look at your website.


    watstyl08
    Participant

    @watstyl08

    @robin W @aussiestar14

    The proposed code changes didn’t work, so I was forced to go back to the three column approach.

    I still really want to move to full-width, but so far no solution has worked.


    Robin W
    Moderator

    @robin-w

    @watstyl08

    What I meant was change it, and then I can use some tools to inspect it and try to help give uyou the code to resolve. Unless I can see ‘full-width’ not being ‘full-width’ I can’t help !


    watstyl08
    Participant

    @watstyl08

    I just used this code, to no avail. It causes an error on the site – check it out.

    <?php 
    
    get_header(); // Loads the header.php template. ?>
     
    	<?php if ( is_bbpress() ) { ?>
     
    		<header class="entry-header">
    			<h1 class="entry-title"><?php single_post_title(); ?></h1>
    			<?php echo apply_atomic_shortcode( 'entry_byline', '<div class="entry-byline">' . __( 'Published by [entry-author] on [entry-published] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', 'spine2' ) . '</div>' ); ?>
    		</header><!-- .entry-header -->
     
    		<?php while( have_posts() ): the_post(); ?>
     
    			<?php the_content(); ?>
     
    		<?php endwhile; ?>
     
     
    		<footer class="entry-footer">
    			<?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '[entry-terms before="Posted in " taxonomy="category"] [entry-terms before="| Tagged "]', 'spine2' ) . '</div>' ); ?>
    		</footer><!-- .entry-footer -->
     
    	<?php } else { ?>
    	<div id="content" class="hfeed">
     
    		<?php get_template_part( 'loop-meta' ); // Loads the loop-meta.php template. ?>
     
    		<?php get_template_part( 'loop' ); // Loads the loop.php template. ?>
     
    		<?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template. ?>
     
    	</div><!-- #content -->
     
    <?php get_footer(); // Loads the footer.php template. ?>

    aussiestar14
    Participant

    @aussiestar14

    Hey,
    I took out the three lines now and in fact the left sidebar is missing, but it is not full width:
    http://www.curlyhorse.info/forum/ausbildung/


    watstyl08
    Participant

    @watstyl08

    same thing happened with me when I tried that


    Jimi Wikman
    Participant

    @mortfiles

    It’s because you still have the sidebar column in the code.
    You can try to chase it down or just hide it with CSS. @aussiestar14 you can fix your forum by doing this:

    add a class to .content-wrap and set the width to 100% (I think if you do it directly on .content-wrap it will mess upp other pages?). Then create a class named .bbpress #sidebar-subsidiary and set display:none in it.

    That way you hide the sidebar column and make the content stretch 100%

    Hope that helps.


    aussiestar14
    Participant

    @aussiestar14

    hey,

    can you exactly tell me what to change in which file?
    Don’t have any css or php knwledge 🙁


    Robin W
    Moderator

    @robin-w

    I was expecting Jimi to respond….

    [EDIT]

    I was halfway through writing detailed instructions, when I popped back to your site and I see that you’ve fixed it.

    1. In the gentlest way, it would have been great to post back here that you’re fixed, would have saved me ten minutes wasted typing 🙂

    2. It would be great if you’d post what you did to help @watstyl08, and others who might have this problem with oxygen and search and find this thread.


    aussiestar14
    Participant

    @aussiestar14

    Hey, I didn’t fix anything! The normal page http://www.curlyhorse.info/forum is working because I inserted a short code and choosed full width. The actual forum is still not working: http://www.curlyhorse.info/forum/ausbildung/
    We still need help!


    Robin W
    Moderator

    @robin-w

    sorry, sorry – missed that bit 🙂

    Ok will start typing again !

    in your bbpress.php

    change the lines that say

    <div class=”content-wrap”> 
    <div id=”content”>
    

    to

    <div class=”bbpress-wrap”> 
    <div id=”bbpress-content”>
    
    

    Then go into

    wp-content/themes/oxygen/style.css

    and at the end of this file put

    .bbpress-wrap {
    width : 100% ;
    }
    #bbpress-content {
    float: left;
    margin: 0 0 30px;
    width : 100% ;
    }

    .bbpress #sidebar-secondary {
    display:none ;

    }

    What this does is get bbpress to use the bbpress-wrap with a width of 100% instead of content-wrap, as content-wrap is used by the other pages and need to be 67%.

    Then .bbpress #sidebar-secondary is set to display none, so that this disappears

    Now if that all works, it is possible that an upgrade of oxygen will take out these changes, so you really need to create a child theme and put both the bbpress.php and the style.css changes in there. See

    Functions files and child themes – explained !

    Do come back if that deosn’t all work, without the theme I can’t test here !


    watstyl08
    Participant

    @watstyl08

    OK!

    I tried this, and I think we’re getting extremely close 🙂

    Note that you also have to remove this code from your bbpress.php file

    <div class="aside">
    		
    		<?php get_sidebar( 'primary' ); // Loads the sidebar-primary.php template. ?>
    

    The only problem with my Forum now is that the “right” sidebar still shows up, albeit below the full-page forum. Check it out here –> http://www.ibeacon.com/forums/forum/ibeacon-com-forums/

    This is my code for the full-page template

    ‘get_header(); // Loads the header.php template. ?>

    </div>

    <?php do_atomic( ‘before_content’ ); // oxygen_before_content ?>

    <div class=”bbpress-wrap”>

    <div id=”bbpress-content”>

    <?php do_atomic( ‘open_content’ ); // oxygen_open_content ?>

    <div class=”hfeed”>

    <?php if ( have_posts() ) : ?>

    <?php while ( have_posts() ) : the_post(); ?>

    <?php do_atomic( ‘before_entry’ ); // oxygen_before_entry ?>

    <div id=”post-<?php the_ID(); ?>” class=”<?php hybrid_entry_class(); ?>”>

    <?php do_atomic( ‘open_entry’ ); // oxygen_open_entry ?>

    <?php echo apply_atomic_shortcode( ‘entry_title’, ‘[entry-title permalink=”0″]’ ); ?>

    <div class=”entry-content”>

    <?php the_content( __( ‘Continue reading <span class=”meta-nav”>→</span>’, ‘oxygen’ ) ); ?>

    <?php wp_link_pages( array( ‘before’ => ‘<p class=”page-links”>’ . __( ‘Pages:’, ‘oxygen’ ), ‘after’ => ‘</p>’ ) ); ?>

    </div><!– .entry-content –>

    <?php echo apply_atomic_shortcode( ‘entry_meta’, ‘<div class=”entry-meta”>[entry-edit-link]</div>’ ); ?>

    <?php do_atomic( ‘close_entry’ ); // oxygen_close_entry ?>

    </div><!– .hentry –>

    <?php do_atomic( ‘after_entry’ ); // oxygen_after_entry ?>

    <?php do_atomic( ‘after_singular’ ); // oxygen_after_singular ?>

    <?php endwhile; ?>

    <?php endif; ?>

    </div><!– .hfeed –>

    <?php do_atomic( ‘close_content’ ); // oxygen_close_content ?>

    </div><!– #content –>

    <?php do_atomic( ‘after_content’ ); // oxygen_after_content ?>

    <?php get_footer(); // Loads the footer.php template. ?>`

    What can I change to eliminate the sidebar remnants that remain?


    Robin W
    Moderator

    @robin-w

    What can I change to eliminate the sidebar remnants that remain?

    The code in your style.css was supposed to do that ie

    .bbpress #sidebar-secondary {
     display:none ; 
    
    }
    

    I cannot see the other sidebar on your site – have you cleared your cache/refreshed your browser, and if you can still see it tell me which browser (eg IE, Chrome etc.) and give me a specific url

    We should be able to crack this one 🙂


    watstyl08
    Participant

    @watstyl08

    Fixed it!

    I didn’t realize the .css code had to go at the very end of the style sheet.

    Everything works perfectly now

    Thanks for all your help!!


    Robin W
    Moderator

    @robin-w

    @watstyl08 – great glad you’re fixed


    @aussiestar14
    – that work for you?


    aussiestar14
    Participant

    @aussiestar14

    I changed
    <div class=”bbpress-wrap”>
    <div id=”bbpress-content”>

    in my bbpress.php and added

    .bbpress-wrap {
    width : 100% ;
    }
    #bbpress-content {
    float: left;
    margin: 0 0 30px;
    width : 100% ;
    }

    .bbpress #sidebar-secondary {
    display:none ;

    }
    to my style.css

    but still have the right sidebar below -.-
    What did i do wrong?


    Robin W
    Moderator

    @robin-w

    it’s not taking

    .bbpress #sidebar-secondary {
     display:none ;
    
    }
    

    try

    
    .bbpress #sidebar-secondary {
     display:none !important;
    
    }
    

    watstyl08
    Participant

    @watstyl08

    You need to make sure that code is at the VERY END of your style.css.


    aussiestar14
    Participant

    @aussiestar14

    ok, it is at the very end and I added the !important; to it
    http://www.curlyhorse.info/forums/forum/ausbildung/
    sidebar is still there

Viewing 25 replies - 1 through 25 (of 51 total)
  • You must be logged in to reply to this topic.
Skip to toolbar