Created
October 4, 2018 15:09
-
-
Save calvez/4c8e758d60988d191fca5b4d05c41ae0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('wp', 'add_login_check'); | |
add_action( 'template_redirect', function() { | |
if ( is_page('szavaz') && ! is_user_logged_in() ){ | |
wp_redirect( site_url( '/' ) ); | |
exit(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment