Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Redirection of wp-login.php results in non working of Logout process

$
0
0

Replies: 0

Hi,
I want to create Custom Login, Registration, Password Reset & Logout Page. For that I have added following code in my function.php file.

function custom_login_page() {
 $new_login_page_url = home_url(); // new login page
 global $pagenow;
 if( $pagenow == "wp-login.php" && $_SERVER['REQUEST_METHOD'] == 'GET' ) {
    wp_redirect($new_login_page_url);
    exit;
 }
}
 add_action('init','custom_login_page');

Everything is working perfectly except the logout process. By adding this code a user is not getting logged out.

In short the Logout Process is not working. Plz Help.

Thanks


Viewing all articles
Browse latest Browse all 59525

Trending Articles