Action hook to control access to certain parts of my site
Put this at the very top of your page.php file, before the get_header() call: <?php // redirect if user isn’t logged in if( ! is_user_logged_in() ) { wp_safe_redirect( home_url( ‘/signup/’ ) ); exit; } // supply IDs of both parent pages $keys = array( ’21’, ’23’ ); // check if user can access page foreach( … Read more