bbp_show_lead_topic

bbp_show_lead_topic

bbp_show_lead_topic
Codex Home → bbp_show_lead_topic
Description
The 『bbp_show_lead_topic』 function is an alternate layout style where topics appear as 「lead」 posts, ahead of replies whereas by default topics are included in the reply loop.
How to use it
When set to $show_lead = true the 『Lead Topic』 uses the single topic part content-single-topic-lead.php allowing you to style the lead topic separately from the main reply loop. It』s also useful if you want to add some ads or a simple note to your readers after the lead topic before the replies.
Sample code example
function custom_bbp_show_lead_topic( $show_lead ) {
$show_lead[] = 'true';
return $show_lead;
}

add_filter('bbp_show_lead_topic', 'custom_bbp_show_lead_topic' );

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

报告拼写错误

以下文本将发送给我们的编辑: