Forums' and Topics' templates

Overview

There is an ability to change forums and topics templates individually for a single forum/topic globally in ForumWP settings. This guide shows you how to easily add custom templates that will be compatible with plugin updates, you can put in the child theme. The templates you add will become selectable when you customize a forum/topic in the Template dropdown or at the ForumWP settings section.

Global Settings

For the forums:

For the topics:

Individual Forum/Topic Settings

For the forums:

For the topics:

What is a "Default Template"?

The WP native "page.php" template is the supported template for the individual topic and individual forum page when you select the "Default Template" value and after the first installation ForumWP plugin. More info about WP native theme files is here.

How to make the custom templates

  • The first step you need is to create this folder if you have not done so already: /your-child-theme/forumwp/. More info here.
  • You can create your additional templates in that folder. You may use any name for the template's file. Make sure that it's a PHP file.
  • You have to make ForumWP recognize this template as a supported template. You can do so by adding the following line to the top of your custom template(s):

    For the forums' templates:

    <?php /* Forum Template: My Forum */ ?>
    	

    For the topics' templates:

    <?php /* Topic Template: My Topic */ ?>
    	

Adding that line on top lets the plugin know which template file is it (please use the same formatting) and make it selectable in the Template selection dropdown when customizing a forum/topic.

That’s it. When you try to customize your forums/topics you can see the additional templates you created and placed in your child theme folder.

Troubleshooting templates

If you correctly pasted your custom templates to the correct directory, please make sure you embed the correct PHP comment header at the start of the template file. You could see these correct PHP comments above.

If you correctly pasted PHP comments at the start of the file, please make sure you correctly pasted your custom templates to the correct directory. You could see information about templates here.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.