Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action( 'init', 'custom_init_function' );
- function custom_init_function() {
- global $pagenow;
- if( ! is_user_logged_in() && 'wp-login.php' == $pagenow ) {
- wp_redirect( home_url() ); // redirect URL
- exit();
- }
- }
Add Comment
Please, Sign In to add comment