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 - 26 through 50 (of 51 total)

  • Robin W
    Moderator

    @robin-w

    ok, can you post the content of your footer.php please


    aussiestar14
    Participant

    @aussiestar14

    Hope this helps :-/
    the footer.php:

    <?php
    /**
    * Footer Template
    *
    * The footer template is generally used on every page of your site. Nearly all other
    * templates call it somewhere near the bottom of the file. It is used mostly as a closing
    * wrapper, which is opened with the header.php file. It also executes key functions needed
    * by the theme, child themes, and plugins.
    *
    * @package Oxygen
    * @subpackage Template
    */
    ?>

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

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

    <?php do_atomic( ‘close_main’ ); // oxygen_close_main ?>

    </div><!– #main –>

    <?php do_atomic( ‘after_main’ ); // oxygen_after_main ?>

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

    <?php do_atomic( ‘before_footer’ ); // oxygen_before_footer ?>

    <div id=”footer”>

    <?php do_atomic( ‘open_footer’ ); // oxygen_open_footer ?>

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

    <?php echo apply_atomic_shortcode( ‘footer_content’, hybrid_get_setting( ‘footer_insert’ ) ); ?>

    </div>

    <?php get_template_part( ‘menu’, ‘subsidiary’ ); // Loads the menu-subsidiary.php template. ?>

    <?php do_atomic( ‘footer’ ); // oxygen_footer ?>

    <?php do_atomic( ‘close_footer’ ); // oxygen_close_footer ?>

    </div><!– #footer –>

    <?php do_atomic( ‘after_footer’ ); // oxygen_after_footer ?>

    </div><!– .wrap –>

    </div><!– #container –>

    <?php do_atomic( ‘close_body’ ); // oxygen_close_body ?>

    <?php wp_footer(); // wp_footer ?>

    </body>
    </html>


    Robin W
    Moderator

    @robin-w

    ok, so what happens at the moment is that the bbpress.php calls the footer.php at the bottom of it.

    The footer in turn calls the sidebar (this is an annoying habit that theme developers have started doing, sidebars should be called in theme pages not in footers aggghhh!).

    so what we’ll do in bbpress.php is simply take out the call to the footer, and put the footer code minus the sidebar into the bbpress.php

    so in bbpress.php remove the line which says

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

    Then put this code in it’s place

    </div><!– .content-wrap –>
    
    <?php do_atomic( ‘close_main’ ); // oxygen_close_main ?>
    
    </div><!– #main –>
    
    <?php do_atomic( ‘after_main’ ); // oxygen_after_main ?>
    
    <?php do_atomic( ‘before_footer’ ); // oxygen_before_footer ?>
    
    <div id=”footer”>
    
    <?php do_atomic( ‘open_footer’ ); // oxygen_open_footer ?>
    
    <div id=”footer-content” class=”footer-content”>
    
    <?php echo apply_atomic_shortcode( ‘footer_content’, hybrid_get_setting( ‘footer_insert’ ) ); ?>
    
    </div>
    
    <?php get_template_part( ‘menu’, ‘subsidiary’ ); // Loads the menu-subsidiary.php template. ?>
    
    <?php do_atomic( ‘footer’ ); // oxygen_footer ?>
    
    <?php do_atomic( ‘close_footer’ ); // oxygen_close_footer ?>
    
    </div><!– #footer –>
    
    <?php do_atomic( ‘after_footer’ ); // oxygen_after_footer ?>
    
    </div><!– .wrap –>
    
    </div><!– #container –>
    
    <?php do_atomic( ‘close_body’ ); // oxygen_close_body ?>
    
    <?php wp_footer(); // wp_footer ?>
    
    </body>
     </html>

    Come back with what that does !


    aussiestar14
    Participant

    @aussiestar14

    hey, i gave it a try:
    http://www.curlyhorse.info/forums/forum/ausbildung/

    and now the whole footer is missing.
    Any ideas?


    Robin W
    Moderator

    @robin-w

    ok, after the line

    <?php do_atomic( ‘after_main’ ); // oxygen_after_main ?>
    

    add

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

    aussiestar14
    Participant

    @aussiestar14

    this does some funny stuff! Have a look at it!


    Vikram Singh Rana
    Participant

    @vikram-singh-rana

    Hey I had the same problem and wanted my forum to have a full width looks. I visited your threat and used the code about but it didn’t worked for me. I have tweaked it and it is working for me now. I had the same problem of topics disappearing.

    Please use this code, it should work perfectly fine.

    <?php
    
    /**
     * bbPress - Forum Archive
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    get_header(); ?>
    
    	<?php do_action( 'bbp_before_main_content' ); ?>
    
    	<?php do_action( 'bbp_template_notices' ); ?>
    
    	<div id="bbpress-forums">
    
    	<?php bbp_breadcrumb(); ?>
    
    	<?php bbp_forum_subscription_link(); ?>
    
    	<?php do_action( 'bbp_template_before_single_forum' ); ?>
    
    	<?php if ( post_password_required() ) : ?>
    
    		<?php bbp_get_template_part( 'form', 'protected' ); ?>
    
    	<?php else : ?>
    
    		<?php bbp_single_forum_description(); ?>
    
    		<?php if ( bbp_has_forums() ) : ?>
    
    			<?php bbp_get_template_part( 'loop', 'forums' ); ?>
    
    		<?php endif; ?>
    
    		<?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
    
    			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'loop',       'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'form',       'topic'     ); ?>
    
    		<?php elseif ( !bbp_is_forum_category() ) : ?>
    
    			<?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
    
    			<?php bbp_get_template_part( 'form',       'topic'     ); ?>
    
    		<?php endif; ?>
    
    	<?php endif; ?>
    
    	<?php do_action( 'bbp_template_after_single_forum' ); ?>
    
    </div>
    
    	</div><!-- #forum-front -->
    
    	<?php do_action( 'bbp_after_main_content' ); ?>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Robin W
    Moderator

    @robin-w

    ok, I’m close to giving up on this – not that I’m not interested in fixing it, but it is just taking too much of my time.

    can you post your full current bbpress.php


    Robkk
    Moderator

    @robkk

    @robin-w

    ok i was able to achieve a full width forum this way with no template editing.

    i downloaded https://wordpress.org/plugins/custom-sidebars/

    i went to my original sidebar in my widgets section

    i then clicked it open and pressed the new sidebar location link

    A window should popup that says “Define where you want this sidebar to appear.”

    i then checked a sidebar for selected post types. then i clicked pages, and posts, add whatever else that you may have, but none that are custom post types that are affiliated with bbpress, (topics, forums, replies)

    that should do it.

    i dont know if any other custom sidebar plugin does this (woosidebars etc.) but i do know this should work.


    aussiestar14
    Participant

    @aussiestar14

    hey,
    unfortunetly the plugin didn’t do the trick…

    so here is the actual bbpress.php:

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

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

    <?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 ?>

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

    <?php do_atomic( ‘close_main’ ); // oxygen_close_main ?>

    </div><!– #main –>

    <?php do_atomic( ‘after_main’ ); // oxygen_after_main ?>

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

    <?php do_atomic( ‘before_footer’ ); // oxygen_before_footer ?>

    <div id=”footer”>

    <?php do_atomic( ‘open_footer’ ); // oxygen_open_footer ?>

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

    <?php echo apply_atomic_shortcode( ‘footer_content’, hybrid_get_setting( ‘footer_insert’ ) ); ?>

    </div>

    <?php get_template_part( ‘menu’, ‘subsidiary’ ); // Loads the menu-subsidiary.php template. ?>

    <?php do_atomic( ‘footer’ ); // oxygen_footer ?>

    <?php do_atomic( ‘close_footer’ ); // oxygen_close_footer ?>

    </div><!– #footer –>

    <?php do_atomic( ‘after_footer’ ); // oxygen_after_footer ?>

    </div><!– .wrap –>

    </div><!– #container –>

    <?php do_atomic( ‘close_body’ ); // oxygen_close_body ?>

    <?php wp_footer(); // wp_footer ?>

    </body>
    </html>


    Robkk
    Moderator

    @robkk

    @aussiestar14

    is this the theme that you have ??

    Oxygen


    aussiestar14
    Participant

    @aussiestar14

    yes, in the version 0.5.4


    aussiestar14
    Participant

    @aussiestar14

    I deleted the line
    <?php get_sidebar( ‘subsidiary’ ); // Loads the sidebar-subsidiary.php template. ?>

    this took out the subsidiary, great start!

    http://www.curlyhorse.info/forum/ausbildung/


    Robkk
    Moderator

    @robkk

    @aussiestar14 ive been reading the replies and right now you just want your themes footer back ??

    and thats it??


    aussiestar14
    Participant

    @aussiestar14

    yes, we so far fixed it that the normal oxygen sidebars aren’t showing up.
    Things which are missing are the new bbpress sidebar and the themes footer…


    Robkk
    Moderator

    @robkk

    @aussiestar14 so now you dont want full width anymore and you want a bbpress specific sidebar and your footer back??


    aussiestar14
    Participant

    @aussiestar14

    i am also happy with full width (That’s the main thing), but best would be of course if the bbpress sidebar and the normal oxygen footer work!

    Didn’t know that it is that complicated… -.-


    Robkk
    Moderator

    @robkk

    Didn’t know that it is that complicated… -.-

    i hate messing with your theme but ILL try to fix it.

    okay Full width vs bbpress sidebar , choose one now.

    what is creating this bbpress sidebar??

    ILL work on getting the footer back first, but yeah its going to be some time later, so try to be patient.


    aussiestar14
    Participant

    @aussiestar14

    I know, thanks!
    bbpress sidebar would be perfect!
    Haven’t seen this sidebar so far. Where can I look this one up?


    Robkk
    Moderator

    @robkk

    @aussiestar14

    ok what should be on this bbpress sidebar??

    is it a plugin, did you make it out of the plugin custom sidebars??

    tell me as much information that you can about it.


    aussiestar14
    Participant

    @aussiestar14

    the bbpress sidebar should be attached to all forum pages.
    The sidebar is exactly called “bbPress sidebar”

    It is available in the widgets area when you have installed the bbpress plugin.
    You can add different widgets like “(bbPress) Forum Search Form”, “(bbPress) Forum List” or “(bbPress) Login Widget” to it.


    Robkk
    Moderator

    @robkk

    i have bbpress and i dont have a forum specific sidebar

    so it must be something else. Do you have this plugin??

    https://wordpress.org/plugins/bbpress-wp-tweaks/

    if your just using it for a forum specific sidebar, custom sidebars plugin can do that??
    you just create a sidebar and only place it on forums, replies, topics then just throw those widgets in there.


    aussiestar14
    Participant

    @aussiestar14

    yes it was the plugin wp-tweaks!
    I deactivated it and now the bbPress sidebar shows up, footer is there because I took out the bbpress.php But there is still the left sidebar. When I use the custom sidebars plugin, I can add widgets to a new left bbPress sidebar, but I can’t choose that there is no left sidebar.


    Robkk
    Moderator

    @robkk

    yes it was the plugin wp-tweaks!

    ya see im a wizard….i know things

    haha okay try the thing i told you before again

    go to the left sidebar

    click allow this sidebar to be replaced ,

    choose location select it only to show up on posts and pages ,

    but not replies, topics, forums.


    aussiestar14
    Participant

    @aussiestar14

    😀
    I deleted the left empty bbPress sidebar, but now the oxygen side appears. There is no difference when I change location settings for primary sidebar to just appear with posts.

    the right sidebar is working very good.

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