redirects to wp-admin on login and logout
-
When login it redirects to /wp-admin/ for the Admin no problem. For users, it’s a problem on logout, it does the same and says “You don’t have permission to access this page.”
I tried the redirect you wrote for someone else and it didn’t work. I had a hide login plugin that loads sign-in with then /login URL and also tried it without that plugin. Same problem.`add_action(‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’);
function my_theme_enqueue_styles() {
wp_enqueue_style(‘listingpr-parent-style’, get_template_directory_uri() . ‘/style.css’);
}
add_filter( ‘login_logout_menu_login’, ‘login_logout_menu_login_cb’ );/**
* Customize the login/logout menu Login Link.
*
* @param string $login_logout_menu_login The login link.
* @return string The modified login link.
*/
function login_logout_menu_login_cb( $login_logout_menu_login ) {
return site_url() . ‘/login’;
}add_filter( ‘login_logout_menu_logout’, ‘login_logout_menu_logout_cb’ );
/**
* Customize the login/logout menu Login Link.
*
* @param string $login_logout_menu_logout The login link.
* @return string The modified login link.
*/
function login_logout_menu_logout_cb( $login_logout_menu_logout ) {
return site_url() . ‘/login’;
}`The page I need help with: [log in to see the link]
- The topic ‘redirects to wp-admin on login and logout’ is closed to new replies.