daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Sep 26th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. add_action( 'init', 'custom_init_function' );
  4. function custom_init_function() {
  5.  
  6.     global $pagenow;
  7.  
  8.     if( ! is_user_logged_in() && 'wp-login.php' == $pagenow ) {
  9.         wp_redirect( home_url() ); // redirect URL
  10.         exit();
  11.     }  
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top