admin管理员组文章数量:1406950
I have created a custom login page on my site and used the login_url filter to redirect to that page each time there's a request. The filter looks like:
// Login page
function my_login_page($login_url, $redirect, $force_reauth) {
// This will append /custom-login/ to you main site URL as configured in general settings (ie /)
$login_url = site_url( '/acceder/', 'login' );
if ( ! empty( $redirect ) ) {
$login_url = add_query_arg( 'redirect_to', urlencode( $redirect ), $login_url );
}
if ( $force_reauth ) {
$login_url = add_query_arg( 'reauth', '1', $login_url );
}
return $login_url;
}
add_filter('login_url', 'my_login_page', 10, 3);
The problem is that since then everytime I login with my account and try to access the dashboard I can't. Whether I am logged-in or not logged-in I get to my custom login page.
Is there a way to solve this problem? So far I tried:
- Remove .htaccess and restore it.
- Flush wp rewrite rules.
- Deactivate all plugins.
- Remove all functions that may create a redirection loop and activate one by one until I found it.
本文标签: loginurl filter creates permanent wpadmin gt wplogin redirection loop
版权声明:本文标题:login_url filter creates permanent wp-admin -> wp-login redirection loop 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745045802a2639354.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论