Primary

Legacy Templates

Important Note: This section refers to Legacy Templates in Groups Forums version 1.x.x.

With Groups Forums version 2.0.0, a new Block-based template system is introduced, utilizing the WordPress Block Editor that is used by default. We encourage you to explore the Single item: Topic and Forum Archives sections for more details and transition to the new template system.


In order to use Legacy Templates, the option Use internal templates found in Topics > Settings, under Templates section, must be enabled.

Then in your active theme, add a groups-forums folder. You can provide template files in that folder for the type of page you want to customize, for example:

single-topic.php used to display a topic
taxonomy-forum.php used to display the topics in a forum
taxonomy-forum-support.php to target a specific forum, here for example the Support forum with the  support slug
archive-topic.php for other forum archives

Default templates, which can also be used to derive your own, are provided in the plugin’s templates folder. Included are a single-topic.php and a taxonomy-forum.php template.

Creating theme-specific templates

If you want to create theme-specific templates, you can base it on the examples in the Groups Forums Templates repository on GitHub or the templates that are included in the plugin’s templates directory.

Example: Assuming you’re using a theme called Foobar that is in wp-content/themes/foobar, add the theme templates in wp-content/themes/foobar/groups-forums. To have it added to the repository, fork it, add the foobar/groups-forums folder to the root of the repository and issue a pull request.

You should end up with the following folder structure:

groups-forums-templates (the root folder of this repository)
– foobar (a new subfolder for the theme)
– groups-forums (a subfolder for the groups-forums templates)
– readme.txt (optional file describing the template files used)
– single-topic.php (the topic template file)
– taxonomy-forum.php (the taxonomy-forum template file)