bbPress Theme Template Files
For those getting into bbPress for hosting your own forum, customizing your bbPress theme files can be difficult if you donāt know which page to load. Many of the bbPress theme template files contain enough clues to figure things out, but not every template file is used by default, or even at all depending on how youāve configured bbPress. Themes may contain different template files, but the default ābbPress (Twenty Ten)ā theme (included with version 2.1.1) may be considered a complete set.
In this post, Iāve listed all of the main template files for bbPress, so the mass of parts contained in the /bbpress/ sub-directory is not included here. Also not included are the JavaScript, CSS, and other self-explanatory files. To illustrate, here is a screenshot showing the files that are covered in this post:
![[ Screenshot of bbPress TwentyTen template-files ]](/?url=https%3A%2F%2Fperishablepress.com%2Fwp%2Fwp-content%2Fimages%2F2012%2Fbbpress-template-files.jpg)
bbPress āmainā template-files (dark-blue background)
bbPress main template-files
This isnāt a template hierarchy, just a list of main template files included with the default Twenty Ten theme. Along with any important notes, an example URL be included for each file. So to view any of these files, edit the example URL to something similar that exists on your site. If youāre working with a new installation of bbPress, you may need to create some ātestā forums, topics, and replies to invoke all of the different template files. So without further ado..
/bbp-twentyten/archive-forum.php
the main forum page (lists all forums)
http://example.com/forums/
/bbp-twentyten/archive-topic.php
list of topics (from all forums)
http://example.com/topics/
/bbp-twentyten/bbpress-functions.php
the bbPress functions file
/bbp-twentyten/single-forum-edit.php
used for editing single forums
(also used by BuddyPress for group forums)
http://example.com/forum/htaccess/edit/
/bbp-twentyten/single-forum.php
single-forum view
http://example.com/forum/htaccess/
/bbp-twentyten/single-reply-edit.php
edit any single reply
http://example.com/reply/test-post/edit/
/bbp-twentyten/single-reply.php
view any single reply
http://example.com/reply/test-post/
/bbp-twentyten/single-topic-edit.php
edit any single topic
http://example.com/topic/basics/edit/
/bbp-twentyten/single-topic-merge.php
merge any single topics
http://example.com/topic/basics/edit/?action=merge
/bbp-twentyten/single-topic-split.php
split any single topic
http://example.com/topic/basics/edit/?action=split
/bbp-twentyten/single-topic.php
view any single topic
http://example.com/topic/basics/
/bbp-twentyten/bbpress/single-user-edit.php
edit any single user
http://example.com/users/username/edit/
/bbp-twentyten/bbpress/single-user.php
view any single user
http://example.com/users/username/
/bbp-twentyten/single-view.php
template for creating custom pages
http://example.com/view/popular-topics/
to see how it works, add this to your functions.php file:
add_action('bbp_register_views', 'view_popular_topics');
function view_popular_topics() {
bbp_register_view('popular-topics', __('Popular Topics'),
array('meta_key'=>'_bbp_reply_count', 'orderby'=>'meta_value_num'), false);
}
/bbp-twentyten/taxonomy-topic-tag-edit.php
edit any tag
http://example.com/topic-tag/test/edit/
/bbp-twentyten/taxonomy-topic-tag.php
view any tag
http://example.com/topic-tag/test/
Page templates:
(all of these template-files may be viewed/tested by creating
a page and applying the tamplate-name from the dropdown menu)
/bbp-twentyten/page-create-topic.php
/bbp-twentyten/page-forum-statistics.php
/bbp-twentyten/page-front-forums.php
/bbp-twentyten/page-front-topics.php
/bbp-twentyten/page-topic-tags.php
/bbp-twentyten/page-topics-no-replies.php
/bbp-twentyten/page-user-login.php
/bbp-twentyten/page-user-lost-pass.php
/bbp-twentyten/page-user-register.php
I hope this helps! Iām not a bbPress expert so plz donāt stone me if I missed something obvious (or not so obvious). Cheers!
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience.
Here you will find posts about web development, WordPress, security, and
6 responses to ābbPress Theme Template Filesā
I have a rather large bbPress 1.1 forum Iāve been putting off moving to the newer plugin version just because I know itās going to be a lot of work getting everything tweaked just right. This post makes the theming part of the job much easier. Thanks!
I agree! Thanks for the snippet!
Just what I was looking for. Thank you!
Iāve used bbPress on a couple of sites, but I found laboriously painful to modify, so Iāve been leaving it alone and tweaking styles here and there. It doesnāt seem to bother the average user as much as it does me.
Iām about to create a new site using it, so Iāll have another look under the hood and see what āimprovementsā i can make.
Thanks for taking the time to write this up, Jeff! Very helpful to me this morning!
Glad it helped, Daniel!