0

I'm reading up on the bbPress help pages to try and find out how to modify a template but with little success.

I see that WP will look for the following theme files and use the top-most first:

plugin-bbpress.php
bbpress.php
forums.php
forum.php
generic.php
page.php
single.php
index.php

However, when I look in the bbPress folder itself, I see no files in there of the those names... so I've no idea what sort of code to put in them. I assumed there would be files with the same names that I could duplicate / modify and include in my own theme folder.

I have also tried creating a page on my website, let's say... 'forum-page' and specified that in my settings as the forum root. However when I do this, WP won't let me edit it as a page, and I therefore can't apply any sort of template to it.

1 Answer 1

0

This is not how templates in bbPress work. The list you posted is for the fallback templates, in case of required templates are missing. If bbPress loads templates from this list, it will load using theme compatibility method so it will work with all themes.

To modify actual bbPress content templates, the best thing to do is:

  1. Create folder bbpress in your active theme folder.

  2. Open wp-content/plugins/bbpress/templates/default/bbpress and there you will find all content templates bbPress uses to display forums, topics and so on.

  3. Any template from there you want to modify, copy to your theme bbpress folder (from step 1) and modify them there. bbPress loads templates from that location if they are present and if not, it will fall back to files in the folder from step 2.

  4. Each template from that folder uses bbp_get_template_part to load other templates in that same folder. If you have bbp_get_template_part('loop', 'forum'), it will load file called loop-forum.php.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.