I have been trying for ages to locate the template that shows a single forum post template and I cannot find it.

Does anyone know where this is located?


  • If you are referring to group forums, then buddypress ask to use bbPress instead. Please confirm. – Chittaranjan Dec 6 '13 at 18:59

Even if I'm also not quite sure if this question is related to bbPress or BuddyPress, locating (plugin-) template files might always be the same:

An easy approach might be to call the body_class() in a file which is definitely active (like header.php). The output will look something like this:

class="forum-archive bbpress archive post-type-archive post-type-archive-forum logged-in admin-bar"

If this is not possible one can print the location of the template file via an action. Simply put this snippet at the bottom of your functions.php:

function show_template_name() {
    global $template;
add_action('wp_head', 'show_template_name');

Note: This will output the complete path to the current template file on every page! Do not use this on a live site! The output will look something like this:


And finally a more sustainable approach might be to use a debug plugin like Query Monitor which will add a Dropdown to the Admin Toolbar like this:

Screenshot WordPress Toolbar, Query Monitor Plugin Dropdown

Note: Even if this looks pretty, please consider that it will take a lot of resources and should also not be used on live sites.

Not the answer you're looking for? Browse other questions tagged or ask your own question.