Skip to content

Instantly share code, notes, and snippets.

@dannyockilson
Last active August 29, 2015 14:02
Show Gist options
  • Save dannyockilson/27e84d86ce5eb5b99e8c to your computer and use it in GitHub Desktop.
Save dannyockilson/27e84d86ce5eb5b99e8c to your computer and use it in GitHub Desktop.
Wordpress Private site
function iadw_login_redirection(){
auth_redirect();
}
add_action( 'wp_head', 'iadw_login_redirection' );
/* to allow visitors to access your home page only just switch the function to
* if(!is_home()) auth_redirect();
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment