Skip to:
Content
Pages
Categories
Search
Top
Bottom

Two forum index pages?

  • @lmcookie62

    Participant

    Hi, i’m getting in a twist trying to sort out my forum index page. It seems like i have 2 versions of it.

    When i setup my forum i created a new page called ‘chat’ and added the [bbp-forum-index]shortcode to it. Everything at first looks to be working great but when i click the index page in my breadcrumbs it takes me to a different index page called ‘forum’ which doesnt have the custom side bar that i set up (which is visible on my ‘chat’ index page and topic pages. One interesting thing is that this ‘forum’ index page picks up my theme styles nicely but my ‘chat’ one loses my theme font.

    I have tried changing my forum slug to ‘chat’ to match my new page and this does resolve the breadcrumb/2 index page issue. BUT i then lose my custom side bar and still dont have the font styling.

    I’m confused on what is going on here so i’m not clear where i need to head to get this sorted out. Should i be making my slug and forum page be named the same or is it that i need to work out why i have two index page? Any advice would be massively appreciated.

    As a note, i used wp tweaks for my custom side bar although i already had SimplePage side bars installed which i use elsewhere on my site. Also, my site uses a custom permalink structure that includes category/post name rather than just the standard postname structure

    I am using wp 4.0, bbpress v2.5.4 and here is a link to my site

    Chat

    Many thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • @robin-w

    Moderator

    this is probably a theme page issue

    see

    Step by step guide to setting up a bbPress forum – Part 1

    depending on your theme, you may need to do some renaming and editing of files – reda the article and then come back if you need further help

    @lmcookie62

    Participant

    Thank you for your reply.

    I’ve had a look at the article but unfortunately i’m not much further with this. I only have one page template – the default page.php and i’ve tried creating a bbpress page template as described but this doesnt change anything. I can’t see in my page.php any reference to a different style for the index page.

    If feels like i should focus first on sorting out my breadcrumb/structural issue. I can’t understand why my site isnt using the page name in the breadcrumb as appears to be the case on other example bbpress sites. See here.

    The example site uses the default slugs whilst the breadcrumb uses the page name – as you’d expect. I’m not clear what to do to get my site working in this way which would get rid of my double index page issue.

    @robin-w

    Moderator

    can you post your page template on here please

    @lmcookie62

    Participant

    Here it is: thanks

    <?php get_header(); ?>

    <?php
    /** Themify Default Variables
    * @var object */
    global $themify;
    ?>

    <!– layout-container –>
    <div id=”layout” class=”clearfix pagewidth”>

    <?php themify_content_before(); //hook ?>
    <!– content –>
    <div id=”content” class=”clearfix”>
    <?php themify_content_start(); //hook ?>

    <?php
    /////////////////////////////////////////////
    // 404
    /////////////////////////////////////////////
    ?>
    <?php if(is_404()): ?>
    <h1 class=”page-title” itemprop=”name”><?php _e(‘404′,’themify’); ?></h1>
    <p><?php _e( ‘Page not found.’, ‘themify’ ); ?></p>
    <?php endif; ?>

    <?php
    /////////////////////////////////////////////
    // PAGE
    /////////////////////////////////////////////
    ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div id=”page-<?php the_ID(); ?>” class=”type-page” itemscope itemtype=”http://schema.org/Article”&gt;

    <!– page-title –>
    <?php if($themify->page_title != “yes”): ?>
    <h1 class=”page-title” itemprop=”name”><?php the_title(); ?></h1>
    <?php endif; ?>
    <!– /page-title –>

    <div class=”page-content entry-content” itemprop=”articleBody”>

    <?php the_content(); ?>

    <?php wp_link_pages(array(‘before’ => ‘<p>‘.__(‘Pages:’,’themify’).’ ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>

    <?php edit_post_link(__(‘Edit’,’themify’), ‘[‘, ‘]’); ?>

    <!– comments –>
    <?php if(!themify_check(‘setting-comments_pages’) && $themify->query_category == “”): ?>
    <?php comments_template(); ?>
    <?php endif; ?>
    <!– /comments –>

    </div>
    <!– /page-content –>

    </div><!– /.type-page –>
    <?php endwhile; endif; ?>

    <?php
    /////////////////////////////////////////////
    // Query Category
    /////////////////////////////////////////////
    ?>

    <?php
    ///////////////////////////////////////////
    // Setting image width, height
    ///////////////////////////////////////////
    if($themify->query_category != “”): ?>

    <?php if(themify_get(‘section_categories’) != ‘yes’): ?>

    <?php query_posts( apply_filters( ‘themify_query_posts_page_args’, ‘cat=’.$themify->query_category.’&posts_per_page=’.$themify->posts_per_page.’&paged=’.$themify->paged.’&order=’.$themify->order.’&orderby=’.$themify->orderby ) ); ?>

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

    <!– loops-wrapper –>
    <div id=”loops-wrapper” class=”loops-wrapper <?php echo $themify->layout . ‘ ‘ . $themify->post_layout; ?>”>

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

    <?php get_template_part(‘includes/loop’, ‘query’); ?>

    <?php endwhile; ?>

    </div>
    <!– /loops-wrapper –>

    <?php if ($themify->page_navigation != “yes”): ?>
    <?php get_template_part( ‘includes/pagination’); ?>
    <?php endif; ?>

    <?php else : ?>

    <?php endif; ?>

    <?php else: ?>

    <?php $categories = explode(“,”,str_replace(” “,””,$themify->query_category)); ?>

    <?php foreach($categories as $category): ?>

    <?php $category = get_term_by(is_numeric($category)? ‘id’: ‘slug’, $category, ‘category’);
    $cats = get_categories( array( ‘include’ => isset( $category ) && isset( $category->term_id )? $category->term_id : 0, ‘orderby’ => ‘id’ ) ); ?>

    <?php foreach($cats as $cat): ?>

    <?php query_posts( apply_filters( ‘themify_query_posts_page_args’, ‘cat=’.$cat->cat_ID.’&posts_per_page=’.$themify->posts_per_page.’&paged=’.$themify->paged.’&order=’.$themify->order.’&orderby=’.$themify->orderby ) ); ?>

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

    <!– category-section –>
    <div class=”category-section clearfix <?php echo $cat->slug; ?>-category”>

    <h3 class=”category-section-title”>cat_ID) ); ?>” title=”<?php _e(‘View more posts’, ‘themify’); ?>”><?php echo $cat->cat_name; ?></h3>

    <!– loops-wrapper –>
    <div id=”loops-wrapper” class=”loops-wrapper <?php echo $themify->layout . ‘ ‘ . $themify->post_layout; ?>”>
    <?php while(have_posts()) : the_post(); ?>

    <?php get_template_part(‘includes/loop’, ‘query’); ?>

    <?php endwhile; ?>
    </div>
    <!– /loops-wrapper –>

    <?php if ($themify->page_navigation != “yes”): ?>
    <?php get_template_part( ‘includes/pagination’); ?>
    <?php endif; ?>

    </div>
    <!– /category-section –>

    <?php else : ?>

    <?php endif; ?>

    <?php endforeach; ?>

    <?php endforeach; ?>

    <?php endif; ?>

    <?php endif; ?>
    <?php wp_reset_query(); ?>

    <?php themify_content_end(); //hook ?>
    </div>
    <!– /content –>
    <?php themify_content_after() //hook; ?>

    <?php
    /////////////////////////////////////////////
    // Sidebar
    /////////////////////////////////////////////
    if ($themify->layout != “sidebar-none”): get_sidebar(); endif; ?>

    </div>
    <!– /layout-container –>

    <?php get_footer(); ?>

    @robin-w

    Moderator

    ok, make a copy of this file and rename it bbpress.php

    put this file in the root of your theme

    ie

    wp-content/themes/%yourthemename%/bbpress.php

    where %yourthemename% is the name of your theme!

    Then amend as follows

    change

    // Sidebar
     /////////////////////////////////////////////
     if ($themify->layout != “sidebar-none”): get_sidebar(); endif; ?>
    

    to

    // Sidebar
     /////////////////////////////////////////////
     get_sidebar();  ?>
    

    This will then force bbpress to use a forum with a sidebar

    @lmcookie62

    Participant

    Hi there, thanks for this. I have made the change but i dont see any change. I also dont really understand how this would fix the breadcrumb issue…?

    @robin-w

    Moderator

    bbpress has two ways to display the forums – see

    Step by step guide to setting up a bbPress forum – Part 1

    You just have a page called chat, whilst the slug is still set to forum, so the latter is what the breadcrumb shows.

    so you need to do two things

    1. change the slug to chat
    2. get bbpress to use your template with a sidebar

    I was trying to fix no. 2 first

    Suggest you refer the issue to you theme provider

    @lmcookie62

    Participant

    Ok will do, thanks very much for your help

    @najuste

    Participant

    From the link it seems the problem was fixed… How?
    I have the same issue while using the child theme of ‘twentyeleven’.

    That 3rd point in ‘Creating a Forum Page’ clearly states what is not necessary… So what should be done instead ? Especially while my created page as here mentioned ‘Chat’ is not following the bbpress.php and so not recognized as bbpress page.

    @robin-w

    Moderator

    Presumably by following my advice? I can never be sure if they don’t come back and say that it worked !


    @lmcookie62
    was a problem with his theme as well.

    Do you have precisely the same problem? and do you have a url we can look at?

    @najuste

    Participant

    Problem is the same, but design is from WordPress.. and the website now is on my local mashine.
    Here is the php of created bbpress.php
    Code is really simple:

    <?php get_header(); ?>
    	<div id="primary">
    		<div id="content" role="main">
    
    			<?php if ( have_posts() ) : ?>
    				<?php while ( have_posts() ) : the_post(); ?>
    					<?php get_template_part( 'content', get_post_format() ); ?>
    				<?php endwhile; ?>
    				<?php twentyeleven_content_nav( 'nav-below' ); ?>
    			<?php endif; ?>
    			
    			</div><!-- #content -->
    		</div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    But the two pages look different..

    Website crop

    Looking at html I have noticed, that newly created page has a different body class assigned and so is not recognized as bbpress forum archive page, but rather as a page..
    <body class="page page-id-902 page-template page-template-bbpress page-template-bbpress-php custom-background single-author singular two-column left-sidebar">

    The breadcrubs issue I have noticed just when I read this..
    As that I guess will get fixed after the the page will be understood as forum archive page..

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