<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Redirect non-logged in user to login page - How-to and Troubleshooting				            </title>
            <link>https://wpforo.com/community/how-to-and-troubleshooting-2/redirect-non-logged-in-user-to-login-page/</link>
            <description>Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Fri, 13 Mar 2026 04:51:17 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Redirect non-logged in user to login page</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/redirect-non-logged-in-user-to-login-page/#post-38104</link>
                        <pubDate>Mon, 16 Mar 2020 13:38:27 +0000</pubDate>
                        <description><![CDATA[@hill-seeker91,
The thread is open. 
&nbsp;]]></description>
                        <content:encoded><![CDATA[<p>@hill-seeker91,</p>
<p>The thread is open. </p>
<p>&nbsp;</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting</category>                        <dc:creator>Sofy</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/redirect-non-logged-in-user-to-login-page/#post-38104</guid>
                    </item>
				                    <item>
                        <title>RE: Redirect non-logged in user to login page</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/redirect-non-logged-in-user-to-login-page/#post-38103</link>
                        <pubDate>Mon, 16 Mar 2020 13:35:32 +0000</pubDate>
                        <description><![CDATA[@sofy Thanks I&#039;ll try that.&nbsp;
Spoke a bit too soon on the other thread (and can&#039;t now post as you&#039;ve closed it!) Can you reopen that so I can add a post please as although it&#039;s a great ...]]></description>
                        <content:encoded><![CDATA[<p>@sofy Thanks I'll try that.&nbsp;</p>
<p>Spoke a bit too soon on the other thread (and can't now post as you've closed it!) Can you reopen that so I can add a post please as although it's a great workaround there is an underlying issue which probably ought to be resolved in a future release. Thanks</p>
<p>&nbsp;</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting</category>                        <dc:creator>hill-seeker91</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/redirect-non-logged-in-user-to-login-page/#post-38103</guid>
                    </item>
				                    <item>
                        <title>RE: Redirect non-logged in user to login page</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/redirect-non-logged-in-user-to-login-page/#post-38099</link>
                        <pubDate>Mon, 16 Mar 2020 13:12:59 +0000</pubDate>
                        <description><![CDATA[Hi @hill-seeker91,
Please put the following code in your current active theme functions.php file:
 
add_filter(&#039;wpforo_after_init_current_object&#039;, function ($current_object){
    if( in_...]]></description>
                        <content:encoded><![CDATA[<p>Hi <span>@hill-seeker91,</span></p>
<p>Please put the following code in your current active theme functions.php file:</p>
<pre> 
add_filter('wpforo_after_init_current_object', function ($current_object){
    if( in_array($current_object, array('forum', 'topic')) ){
        if( !WPF()-&gt;current_userid &amp;&amp; !WPF()-&gt;perm-&gt;forum_can('vf', $current_object) ){
	        wp_redirect( wpforo_login_url() );
	        exit();
        }
    }
    return $current_object;
});
</pre>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting</category>                        <dc:creator>Sofy</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/redirect-non-logged-in-user-to-login-page/#post-38099</guid>
                    </item>
				                    <item>
                        <title>Redirect non-logged in user to login page</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/redirect-non-logged-in-user-to-login-page/#post-38043</link>
                        <pubDate>Sun, 15 Mar 2020 16:50:04 +0000</pubDate>
                        <description><![CDATA[Hi I&#039;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 se...]]></description>
                        <content:encoded><![CDATA[<p>Hi I'm just experimenting with setting up wpforo on a new site with a private forum.</p>
<p>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)</p>
<p>Is this possible? If so, how do I do it? Thanks.</p>
<p> </p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting</category>                        <dc:creator>hill-seeker91</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/redirect-non-logged-in-user-to-login-page/#post-38043</guid>
                    </item>
							        </channel>
        </rss>
		