Check if wp-login is current page
Use the global $pagenow, which is a common global set by WordPress at runtime: if ( $GLOBALS[‘pagenow’] === ‘wp-login.php’ ) { // We’re on the login page! } You can also check the type of login page, for example registration: if ( $GLOBALS[‘pagenow’] === ‘wp-login.php’ && ! empty( $_REQUEST[‘action’] ) && $_REQUEST[‘action’] === ‘register’ ) … Read more