路由更改:
add_filter( 'login_url', 'smyles_custom_login_url', 10, 3 );
function smyles_custom_login_url( $login_url, $redirect, $force_reauth ){
// This will append /custom-login/ to you main site URL as configured in general settings (ie https://domain.com/custom-login/)
$login_url = site_url( '/custom-login/', '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;
}
新建页面相关:
© 版权声明
THE END