if (!is_user_logged_in()) { 
   wp_redirect(site_url('login')); 
}
Advertisements