类似其他的论坛,帖子的发布者会带有 “楼主” 标识。
转载自薇晓朵技术论坛。
将下面的代码片段添加到已激活主题的 functions.php
文件即可:
//添加楼主和非楼主角色 function bbp_post_starter( $args = '' ) { $topic_author = bbp_get_topic_author_id(); $reply_author = bbp_get_reply_author_id( $reply_id ); if ( bbp_is_single_user_replies() ) { } elseif ( $reply_author === $topic_author ) { ?> <span class="post-starter-bq"> 楼主</span> <?php } } add_filter('bbp_theme_after_reply_author_details', 'bbp_post_starter');