Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress causes Category pages to show full posts

  • @kitfreeman

    Participant

    Hi

    I’ve recently installed bbPress. It works fine but it’s had an unwanted side-effect on the Category pages on the rest of my site. I’d set these to show short excerpts only, but after installing bbPress they now show full posts, which I really don’t want. Is there a way I can tweak bbPress to stop this effect. Can anyone help, please?

    Best, Kit

Viewing 14 replies - 1 through 14 (of 14 total)
  • @robkk

    Moderator

    I’d set these to show short excerpts only

    is this an option in your themes settings??

    but im going to assume your theme thinks bbPress is a blog post , adn that you should create a bbpress.php file and remove any unwanted code.

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    this plugin will help you find the right file to copy to create a bbpress.php file.

    https://wordpress.org/plugins/what-the-file/

    @kitfreeman

    Participant

    Hi Thanks for your reply. Yes, there’s a theme option to show extracts only, but it only works when the bbPress plugin is deactivated. Does the advice you’ve given still apply? Thanks again.

    @robkk

    Moderator

    sorry for the late reply.

    The advice i gave you should help.

    but if it doesn’t what is your theme name so i could check it out?? hopefully its not a premium theme.

    @kitfreeman

    Participant

    Thanks. The theme is atahualpa 3.7.23. It’s a popular theme, I think. The theme has an option to show excerpts rather than full posts on category pages (under Atahualpa Theme Options > Configure Excerpts), but activating the bbPress plugin overrides it. I’ve played around with the plugin settings, but it makes no difference.

    I’ve tried to follow your advice about creating a .php file, but to be honest I’m not really sure what I’m doing. If you have any more specific suggestions, I’d be very grateful. 🙂

    Thanks again

    @kitfreeman

    Participant

    I hope people won’t mind if I bump this. I’ve still not been able to solve the problem and would be very grateful for help.

    @robkk

    Moderator

    ok thanks for reminding me …again.

    i have been losing track on these topics lately.

    What i found is that this bug is because of your theme and not really bbPress. So i recommend contacting your theme developers about this especially since they want to support bbPress.

    in the bfa_post_parts.php file in your functions folder, under the bfa_post_bodycopy function you will see

    OR function_exists('is_bbpress')

    This is what is causing your issue.

    the way i figured out to fix it is to remove this and create my own bbpress.php off of the index.php file from your theme.

    this is all the code i used to create the file. So you can copy and paste this into your theme into a bbpress.php file and all should work …hopefully.

    I also left the widget areas there if you want them still there user theme/replace them or just remove them.

    <?php 
    list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
    get_header(); 
    extract($bfa_ata); 
    global $bfa_ata_postcount;
    ?>
    
    <?php /* If there are any posts: */
    if (have_posts()) : /* Postcount needed for option "XX first posts full posts, rest excerpts" */ ?>
    
        <?php  if ($bfa_ata['widget_center_top'] <> '') { 
              echo bfa_parse_widget_areas($bfa_ata['widget_center_top']); 
    	} ?>
    
    	<?php while (have_posts()) : the_post();?>
    	
    		<?php /* Post Container starts here */
    		if ( function_exists('post_class') ) { ?>
    		<div <?php if ( is_page() ) { post_class('post'); } else { post_class(); } ?> id="post-<?php the_ID(); ?>">
    		<?php } else { ?>
    		<div class="<?php echo ( is_page() ? 'page ' : '' ) . 'post" id="post-'; the_ID(); ?>">
    		<?php } ?>
    		<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
    		<div class="post-bodycopy clearfix"><?php the_content(); ?></div>
    		</div><!-- / Post -->	
    						
    	<?php endwhile; ?>
    
        <?php if ($bfa_ata['widget_center_bottom'] <> '') { 
              echo bfa_parse_widget_areas($bfa_ata['widget_center_bottom']); 
        } ?>
    
    <?php endif; /* END of: If there are no posts */ ?>
    
    <?php get_footer(); ?>

    @kitfreeman

    Participant

    Thank you very much for diagnosing this problem. May I repost your reply on the Atahualpa forum, please, so the developers can modify the theme, if they wish?

    Thanks again.

    @robkk

    Moderator

    yeah go ahead

    and no problem

    @juggledad

    Participant

    @robkk: Just to clarify something, the OR function_exists('is_bbpress') was added (with some other code, to get around a bug that bbpress doesn’t seem to want to acknowledge or fix. see https://bbpress.trac.wordpress.org/ticket/2723

    @gena2222

    Participant

    What i found is that this bug is because of your theme and not really bbPress.and no problem.

    @robkk

    Moderator

    @juggledad

    @robkk: Just to clarify something, the OR function_exists(‘is_bbpress’) was added (with some other code, to get around a bug that bbpress doesn’t seem to want to acknowledge or fix. see https://bbpress.trac.wordpress.org/ticket/2723

    Thanks for pointing that out, i did not know about that bug.

    Okay with this bug in bbPress you cannot use the WP conditional is_single() to affect all of the bbPress pages, since for some reason there is a bug for single user pages.Thanks for creating the trac ticket, I tested out and see that yes it does not work on user pages. Over the next few days/week i will check it out and see I can come up with a fix.

    But this bug is easily avoidable by creating a bbpress.php for your theme and just using the_content() instead of bfa_post_bodycopy() and removing OR function_exists('is_bbpress') from the bfa_post_bodycopy() function. The bbpress.php file also helps remove other post meta that might not be useful for bbPress forums instead of using CSS to hide them.

    The OR function_exists('is_bbpress') you can keep in bfa_get_options.php though as i do not see any problems with that.

    If there is something you can find on your end to fix the issue with your theme and bbPress then please drop an answer on this topic, because i haven’t looked and learned your theme 100% yet. Removing the function exists and creating a bbpress.php is the quickest solution to the problem that I could find.


    @kitfreeman

    This excerpt issue that you are seeing affects all of these areas

    category pages
    tag pages
    author pages
    archive pages
    search result pages
    and the home page

    which is where all the excerpt theme settings modify.

    @sharongraylac

    Participant

    Hello Robkk!

    I may be having a similar issue. Should I start a new thread? Or explain more here? Just don’t want to step on toes…

    Thanks!
    Sharon
    bellynsoul.com

    @robkk

    Moderator

    @sharongraylac

    create a new topic

    @sharongraylac

    Participant

    Thought so. 🙂

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