• Resolved afjsystem

    (@afjsystem)


    Hi, I’m trying to block specific pages to logged in users
    615 is the specific page for login
    455 is the specific page for register
    Both page no useful anymore since the users logged in, right ?
    see below code :

    <?php //Block Specific Page to Users Logged In
    add_action( 'template_redirect', 'block_spec_page' );
    function block_spec_page() {
    	if (!is_user_logged_in())
    		return;
    	else
    	   (is_page(array(615, 455))) {
    		wp_redirect( 'member-area' );
    	   }
        return;
    }
    ?>

    the above code just result white/blank page a.k.a error.
    what is the proper action hook ?
    is my function correct ?
    anyone can help me resolve this ?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘block spec page to logged in users’ is closed to new replies.