Notifications
Clear all

Is it safe to use WPFORO_THEME_DIR constant?

2 Posts
2 Users
0 Reactions
328 Views
Posts: 8
Topic starter
(@docdunning)
Active Member
Joined: 8 months ago

I'd like to use the WPFORO_THEME_DIR constant, because it is already set up with the path to the plugin's theme directory. 

I'm putting some code in the wpforo directory in my own theme, to override / customise a template or two.  I mentioned this in another post.  It enables me to add a bit of code that switches "guest" users to the login page so that they see nothing of the forum.

Now I'd like to use PHP "include" to use one of the plugin's theme files.  The WPFORO_THEME_DIR constant will be useful ... but is it safe to use?  I don't want to risk it disappearing in some future release.

1 Reply
Sofy
Posts: 4900
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 years ago

Hi,

First of all, please note that we don't recommend changing the files within the wpForo folder directly. It's preferable to utilize update-safe methods for customization. For detailed instructions on how to customize wpForo themes in an update-safe manner, please refer to this documentation: https://wpforo.com/docs/wpforo-v2/forum-themes/theme-customization/

Additionally, we recommend you reading this document: https://wpforo.com/docs/wpforo-v2/forum-themes/theme-files/  

Regarding the WPFORO_THEME_DIR constant, while it can be used, we recommend exploring alternative methods for customization.

Reply