Skip to content

Instantly share code, notes, and snippets.

@vishalbasnet23
Created October 10, 2014 06:39
Show Gist options
  • Save vishalbasnet23/dfaffe176c27b8777e5d to your computer and use it in GitHub Desktop.
Save vishalbasnet23/dfaffe176c27b8777e5d to your computer and use it in GitHub Desktop.
Simple Authentication function
function authentication_redirect () {
if( !is_user_logged_in() ) {
$login_page_url = get_permalink( get_page_by_path( 'log' ) );
wp_safe_redirect($login_page_url);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment