How can I tell if I’m on a login page? [duplicate]
Paste this function in your functions.php or a plugin file: function is_login_page() { return in_array($GLOBALS[‘pagenow’], array(‘wp-login.php’, ‘wp-register.php’)); } and then you can use it like this: if(is_login_page()){ //this is a login page }else{ //not the page you are looking for }