Skip to content

Instantly share code, notes, and snippets.

@lynt-smitka
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lynt-smitka/18e9ffb3f1452569abe8 to your computer and use it in GitHub Desktop.
Save lynt-smitka/18e9ffb3f1452569abe8 to your computer and use it in GitHub Desktop.
Presměrování na přihlášení
add_action('get_header', 'lynt_redirect_to_login');
function lynt_redirect_to_login(){
if ( is_page(123) ) {//nutno zadat spravne id stranky
if(!is_user_logged_in()) auth_redirect();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment