webworthydesign
9/22/2015 - 8:22 PM

Checks if True/False ACF has been checked and if user is logged in. If not logged in redirects to login page.

Checks if True/False ACF has been checked and if user is logged in. If not logged in redirects to login page.

<?php 
// Logged In Check
if( get_field('subscription_page') && !is_user_logged_in() ) {
	wp_redirect( wp_login_url() ); exit;
}
// END Logged In Check
?>