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' );

bbp_theme_after_topic_author

bbp_theme_after_topic_author

bbp_theme_after_topic_author
Codex Home → bbp_theme_after_topic_author
Description
The 『bbp_theme_after_topic_author』 action is used to display content after the author』s avatar and name in a forum
How to use it
Since this is an action, we can use add_action to hook into it.
Sample code example
1234add_action( 'bbp_theme_after_topic_author', 'jc_after_topic_author' );function jc_after_topic_author() {     echo 'Hello world!';}
Note: Always remember to prefix your functions to avoid conflicts!

bbp_theme_after_forum_sub_forums

bbp_theme_after_forum_sub_forums

bbp_theme_after_forum_sub_forums
Codex Home → bbp_theme_after_forum_sub_forums
Description
The 『bbp_theme_after_forum_sub_forums』 action is used to display content after each list of sub forum links.
Where it can be found
On line 26 of
/bbp-theme-compat/bbpress/loop-single-forum.php
/bbp-themes/bbp-twentyten/bbpress/loop-single-forum.php
1
How to use it
Since this is an action, we can use add_action to hook into it.
Sample code example
1234add_action( 'bbp_theme_after_forum_sub_forums', 'jc_after_sub_forum_list' );function jc_after_sub_forum_list() {     echo 'Hello world!';}
Note: Always remember to prefix your functions to avoid conflicts!

bbp_get_forum_freshness_link

bbp_get_forum_freshness_link

bbp_get_forum_freshness_link
Codex Home → bbp_get_forum_freshness_link
How to use it
1
$forum_id (optional) – Returns the link for the most recent reply within a forum
Used in bbp_forum_freshness_link()
Sample code example
1
Returns the link for the most recent reply within a forum
1
Returns the link for the most recent reply within the specified forum with an ID of 1

bbp_forum_reply_count

bbp_forum_reply_count

bbp_forum_reply_count
Codex Home → bbp_forum_reply_count
Description
The 『bbp_forum_reply_count』 function is used to display the total count of all replies to topics within a forum and sub forums
How to use it
1
$forum_id (optional) – Returns count for particular forum id
$total_count (optional) – Returns total count for all replies in forum and sub forums by default and returns total count for all replies in forum but not sub forums if true, must set $forum_id to work if true
Uses bbp_get_forum_reply_count()
Sample code example
1
Displays the total count of all replies within a forum and sub forums
1
Displays the count of all replies within a forum and not sub forums with a forum ID of 1

bbp_theme_before_forum_description

bbp_theme_before_forum_description

bbp_theme_before_forum_description
Codex Home → bbp_theme_before_forum_description
Description
The 『bbp_theme_before_forum_description』 action is used to display content before the description of the forum on forum index pages.
Where it can be found
On line 28 of
/bbp-theme-compat/bbpress/loop-single-forum.php
/bbp-themes/bbp-twentyten/bbpress/loop-single-forum.php
1
How to use it
Since this is an action, we can use add_action to hook into it.
Sample code example
1234add_action( 'bbp_theme_before_forum_description', 'jc_before_forum_description' );function jc_before_forum_description() {     echo 'Hello world!';}
Note: Always remember to prefix your functions to avoid conflicts!

bbp_theme_after_forum_freshness_link

bbp_theme_after_forum_freshness_link

bbp_theme_after_forum_freshness_link
Codex Home → bbp_theme_after_forum_freshness_link
Description
The 『bbp_theme_after_forum_freshness_link』 action is used to display content after the forum freshness link
How to use it
Since this is an action, we can use add_action to hook into it.
Sample code example
add_action( 'bbp_theme_after_forum_freshness_link', 'jc_after_forum_freshness_link' );
function jc_after_forum_freshness_link() {
echo 'Hello world!';
}
Note: Always remember to prefix your functions to avoid conflicts!

bbp_get_forum_reply_count

bbp_get_forum_reply_count

bbp_get_forum_reply_count
Codex Home → bbp_get_forum_reply_count
Description
The 『bbp_get_forum_reply_count』 function is used to return the total count of all replies to topics within a forum and sub forums
How to use it

$forum_id (optional) – Returns count for particular forum id
$total_count (optional) – Returns total count for all replies in forum and sub forums by default and returns total count for all replies in forum but not sub forums if true, must set $forum_id to work if true
Used by bbp_forum_reply_count()
Sample code example

Returns the total count of all replies within a forum and sub forums

Returns the count of all replies within a forum and not sub forums with a forum ID of 1

bbp_theme_after_forum_description

bbp_theme_after_forum_description

bbp_theme_after_forum_description
Codex Home → bbp_theme_after_forum_description
Description
The 『bbp_theme_after_forum_description』 action is used to display content after the description of the forum on forum index pages.
Where it can be found
On line 32 of
/bbp-theme-compat/bbpress/loop-single-forum.php
/bbp-themes/bbp-twentyten/bbpress/loop-single-forum.php

How to use it
Since this is an action, we can use add_action to hook into it.
Sample code example
add_action( 'bbp_theme_after_forum_description', 'jc_after_forum_description' );
function jc_after_forum_description() {
echo 'Hello world!';
}
Note: Always remember to prefix your functions to avoid conflicts!

bbp_theme_before_topic_author

bbp_theme_before_topic_author

bbp_theme_before_topic_author
Codex Home → bbp_theme_before_topic_author
Description
The 『bbp_theme_before_topic_author』 action is used to display content before the author』s avatar and name in a forum
How to use it
Since this is an action, we can use add_action to hook into it.
Sample code example
1234add_action( 'bbp_theme_before_topic_author', 'jc_before_topic_author' );function jc_before_topic_author() {     echo 'Hello world!';}
Note: Always remember to prefix your functions to avoid conflicts!