Notifications
Clear all

[Solved] wpForo advanced theme customization

4 Posts
2 Users
2 Reactions
2,150 Views
Posts: 201
 fawp
Topic starter
(@fawp)
Reputable Member
Joined: 5 years ago

Hello,

 

According to wpForo documentation about customizing themes,

You can edit these files in an upgrade-safe way using overrides. For example, copy the certain or all files of /classic/ folder into a folder within your current active WordPress theme named /wpforo/, keeping the same file structure.

 

So I tried for example to customize the post.php template by copying it into

wp-content/themes/yourtheme/wpforo/layouts/1/post.php

as documented and this works. So far, so good.

 

What if I wanted to customize a template other than forum.php, topic.php or post.php? For instance, if I wanted to customize members.php in an upgrade-safe way, could I copy the entire /classic/ folder onto another theme (let's call it /mytheme123/) and do the modifications there?

 

In other words, as well as having the folder structure

 

wp-content/plugins/wpforo/wpf-themes/classic/

 

I would also have

 

wp-content/plugins/wpforo/wpf-themes/mytheme123/

 

which is where I would perform the customizations.

Presumably, next time wpForo is upgraded it would be a matter of saving the contents of this /mytheme123/ folder somewhere else, upgrade and then copy back the /mytheme123/  folder.

 

I do realize that, should there be any changes made by you guys to one or more files that are currently in the /classic/ folder, those changes would not be reflected in the customized theme, and that I would have to perform some checks to see what, if anything, was changed.

 

Do you see any issues with this approach, or do you have a better suggestion?

 

Thanks

fawp

 

 

 

 

3 Replies
Posts: 201
 fawp
Topic starter
(@fawp)
Reputable Member
Joined: 5 years ago

Update: I've just read in this post

 

  1. you need to copy the recent.php file (from wp-content/plugins/wpforo/wpf-themes/classic) into a folder within your current active WordPress theme named /wpforo/,
  2. in the 106 line find the wpforo_member_link  function,
  3. change the last argument 's value.

Does that mean that I can simply copy any template file I want to modify into my active theme?

If so, do I need to maintain a certain folder structure?

 

Thanks

1 Reply
Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10589

@fawp,

The template file customization documentation is here:

https://wpforo.com/docs/root/forum-themes/theme-customization/

As you can see, you should create /wpforo/ folder in your active WordPress theme folder and copy the preferred wpForo template file into just created /wpforo/ folder.

And here are all template files (the CSS files are not supported yet):

https://wpforo.com/docs/root/forum-themes/theme-files/

Posts: 201
 fawp
Topic starter
(@fawp)
Reputable Member
Joined: 5 years ago

Great, thanks @Robert, I get it now.