bbpress-functions.php
Codex Home → bbpress-functions.php
This page has no content of its own, but contains some sub-pages listed in the sidebar.
Please edit this page and add something helpful!
bbpress-functions.php
Codex Home → bbpress-functions.php
This page has no content of its own, but contains some sub-pages listed in the sidebar.
Please edit this page and add something helpful!
bbp_forum_title
Codex Home → bbp_forum_title
This function can be used inside template files to display the forum title.
Example Usage
Useful Template Functions
bbp_get_single_topic_description
Codex Home → bbp_get_single_topic_description
bbp_get_single_topic_description
bbp_get_breadcrumb
Codex Home → bbp_get_breadcrumb
bbp_get_breadcrumb
bbp_breadcrumb
Codex Home → bbp_breadcrumb
bbp_breadcrumb
bbp_single_topic_description
Codex Home → bbp_single_topic_description
bbp_single_topic_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_forum_post_count
Codex Home → bbp_forum_post_count
Description
The 『bbp_forum_post_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 or if true, otherwise returns total count for all replies in a forum not including replies in subforum(s)
Uses bbp_get_forum_post_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 excluding sub forums of parent forum
bbp_get_forum_last_active_id
Codex Home → bbp_get_forum_last_active_id
Description
The 『bbp_get_forum_last_active_id』 function returns the ID of the most recent reply within a forum
How to use it
1
$forum_id (optional) – Returns the ID of the most recent reply within the specified forum
Used in bbp_forum_last_active_id()
Sample code example
1
Returns the ID of the most recent reply within a forum
1
Returns the ID of the most recent reply within the specified forum
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!