how to change the default login page of wordpress from wp-login.php to custom login page. So that any request for login by any user should redirect to custom login page instead of wp-login.php.
Asked
Active
Viewed 2,204 times
1 Answers
2
here's an answer from another answer, put in functions.php:
add_action('init','possibly_redirect');
function possibly_redirect(){
global $pagenow;
if( 'wp-login.php' == $pagenow ) {
wp_redirect('http://google.com/');
exit();
}
}
Into "http://google.com/" enter the URL of the custom page.
Community
- 1
- 1
tempranova
- 929
- 9
- 13
-
thanks for your help. I have one thing to ask you. I have renamed wp-login.php with name wp-login.php plugin. So shall I use that renamed name in that code or wp-login? – user3187719 Jan 29 '14 at 06:13