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