I used following function in my theme So that page can redirect to same page after Logout:
add_modal_login_button( $login_text = ‘Login’, $logout_text = ‘Logout’, $logout_url = $_SERVER[‘REQUEST_URI’], $show_admin = false);
But It redirects to homepage
Note: I fixed this by hacking your code. In class-wp-modal-login.php file line 544 I changed this:
wp_logout_url( esc_url( $logout_url ) )
wp_logout_url( $logout_url )
Seems it works now. But i don’t like changing into code. Hope you fix this
- The topic ‘Bug: Logout redirection in the same page doesn't work’ is closed to new replies.