Limited Support
Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.
Hi I'm just experimenting with setting up wpforo on a new site with a private forum.
While wpForo seems to hide topics and posts from non-logged in users, it would be nice if there was a setting to simply redirect anyone trying to access the forum who isn't logged in to the login page. (Easier user experience for members to work out that's what they've forgotten to do, and more secure that it doesn't show there is a valid forum board with that name)
Is this possible? If so, how do I do it? Thanks.
Â
Hi @hill-seeker91,
Please put the following code in your current active theme functions.php file:
 add_filter('wpforo_after_init_current_object', function ($current_object){ if( in_array($current_object['template'], array('forum', 'topic')) ){ if( !WPF()->current_userid && !WPF()->perm->forum_can('vf', $current_object['forumid']) ){ wp_redirect( wpforo_login_url() ); exit(); } } return $current_object; });