Hi,
I was given this code to restrict non logged users and redirect them to the register page. Now however this code seems to block the activation of users account. When a user receives the activation link they are redirected to the register page although the page is allowed in the snippet. I flushed out all cache, deactivated pluggins but the problem was with the snippet. Can you please recheck this snippet. I have provided admin access to the back end.
Thanks
Hamsar.co/wp-admin
hamsarÂ
#dS5(xcXoi#U1#
// Restrict guests access function sq7R_kleo_restrictions_guest_restrict() { $allowedpages = array(‘register’,’activate’,’home’); if( !is_user_logged_in() && !is_page($allowedpages) ) { wp_redirect(site_url( ‘/register’) ); } } add_action(‘template_redirect’, ‘sq7R_kleo_restrictions_guest_restrict’);