WordPress 技巧:用户注册后重定向到自定义页面
WordPress 注册之后默认是重定向网站后台,如果我们要注册后重定向到自定义页面,怎么处理呢?
add_filter( 'registration_redirect', 'wpjam_registration_redirect' );
function wpjam_registration_redirect(){
return home_url( '/my-page' );
}
将上面的代码添加到当前主题的 functions.php
文件中即可。
©我爱水煮鱼,本站推荐使用的主机:阿里云,国外主机建议使用BlueHost。
本站长期承接 WordPress 优化和建站业务,请联系微信:「chenduopapa」。