whereabouts in loop-forums.php did you put it ?
Currently it looks like this:
<?php
/**
* Forums Loop
*
* @package bbPress
* @subpackage Theme
*/
?>
<?php echo do_shortcode(‘[bbpress_recent_replies_by_topic]’) ?>
<?php do_action( ‘bbp_template_before_forums_loop’ ); ?>
<ul id=”forums-list-<?php bbp_forum_id(); ?>” class=”bbp-forums nk-forum”>
<?php while ( bbp_forums() ) : bbp_the_forum(); ?>
<?php bbp_get_template_part( ‘loop’, ‘single-forum’ ); ?>
<?php endwhile; ?>
<!– .forums-directory –>
<div class=”nk-gap-2″></div>
<?php do_action( ‘bbp_template_after_forums_loop’ ); ?>`
not sure why, but adding show seems to fix
<?php echo do_shortcode(‘[bbpress_recent_replies_by_topic show =5]’) ?>
I tried to do that now and update the file, but still no change.
<?php
/**
* Forums Loop
*
* @package bbPress
* @subpackage Theme
*/
?>
<?php echo do_shortcode(‘[bbpress_recent_replies_by_topic show =5]’) ?>
<?php do_action( ‘bbp_template_before_forums_loop’ ); ?>
<ul id=”forums-list-<?php bbp_forum_id(); ?>” class=”bbp-forums nk-forum”>
<?php while ( bbp_forums() ) : bbp_the_forum(); ?>
<?php bbp_get_template_part( ‘loop’, ‘single-forum’ ); ?>
<?php endwhile; ?>
<!– .forums-directory –>
<div class=”nk-gap-2″></div>
<?php do_action( ‘bbp_template_after_forums_loop’ ); ?>
ok, remove the whole line
<?php echo do_shortcode(‘[bbpress_recent_replies_by_topic show =5]’) ?>
then add this to your functions
add_action( 'bbp_template_before_forums_loop', 'call_bbpress_recent_replies_by_topic' );
function call_bbpress_recent_replies_by_topic () {
echo do_shortcode("[bbpress_recent_replies_by_topic show=5]") ;
}
This just hooks to the line after the one you’d added
<?php do_action( ‘bbp_template_before_forums_loop’ ); ?>
so saving you having to amend that template.
This works on my site.