In this case I want to make the code work only if there are more than 5 replies.
<?php if ( bbp_topic_reply_count() > 5 ) : ?>
<?php query_posts('gdsr_sort=thumbs&post_type=bbp_reply&posts_per_page=2&post_parent='.$post->ID); ?>
<?php while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php bbp_reply_author_link( array( 'type' => 'avatar' ) ); ?>
<?php bbp_reply_author_link( array( 'type' => 'name' ) ); ?>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
<?php endif; ?>
The replies are effectively being shown in the code below:
<h4><?php bbp_topic_reply_count(); ?></h4>
But it seems like its not working in the if statement.
Any suggestions?