Skip to:

Getting Started in Modifying the Main bbPress Template

Codex HomeTheme Compatibility → Getting Started in Modifying the Main bbPress Template

[NOTE: The target audience for this page is someone who has basic familiarity with editing wordpress theme templates.]

If you are just picking up bbPress and you want to make some basic changes to the template that is being rendered like say removing WordPress comments code or any post meta that should only be shown on blog posts, then please follow this guide.

On a plain vanilla install of bbPress , the plugin looks for the following templates from your current active WordPress theme and “injects” the forum into the first one it finds:

For WordPress themes it is most commonly going to inject the forum code into page.php file. To find the exact file install the plugin What The File and go to the bbPress forums section of your site and check your WordPress Toolbar and see what the exact file to modify is.

You can then copy the file page.php or the file you found with the What The File plugin and rename it to any of the file names listed above and make sure it is in your child themes root directory. Using bbpress.php for the files name should be unique enough for bbPress and not cause any future issues. After all that customize the new bbpress.php file to what you desire and the bbPress plugin should pick up that template and render the forum using that custom template.

Another way to render custom template code for your bbPress forums is to use conditional tags like is_bbpress() inside of a PHP if statement.

Here is an example.

<?php if ( is_bbpress() ) : ?>

    <div class="abc">

        <p>This content should show if it is bbPress</p>


<?php else : ?>

    <div class="xyz">

        <p>This should show if it is not bbPress</p>


<?php endif; ?>
Skip to toolbar