[ 이 글은 2016년 3월 14일에 최종 수정되었습니다. ]

참고: 인기 워드프레스 테마 중 하나인 The 7이 39달러로 할인 중입니다.

bbPress the number of Replies

In bbPress, a WordPress plugin, the number of posts is displayed instead of that of replies. To display the actual number of replies, we need to subtract “1” from the number of posts. To do this, please add the following function to your theme function file (functions.php):

function bbp_get_topic_post_count_modified( $replies, $topic_id ) {
        $topic_id = bbp_get_topic_id( $topic_id );
        $replies  = (int) get_post_meta( $topic_id, '_bbp_reply_count', true );
        
        return $replies;
    }
add_filter( 'bbp_get_topic_post_count', 'bbp_get_topic_post_count_modified', 10, 2 );

bbPress Replies count corrected
Now the number of replies is displayed instead of the that of posts in bbPress. (Note: You can download a table-style bbPress template at this post.)

Please feel free to leave a Comment (). Have a great day.