この場合、返信が 5 件を超える場合にのみコードを機能させたいと考えています。
<?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; ?>
返信は、以下のコードで効果的に表示されています。
<h4><?php bbp_topic_reply_count(); ?></h4>
しかし、if文では機能していないようです。
助言がありますか?