WordPress 注册之后默认是重定向网站后台,如果我们要注册后重定向到自定义页面,怎么处理呢?
add_filter( 'registration_redirect', 'wpjam_registration_redirect' ); function wpjam_registration_redirect(){ return home_url( '/my-page' ); }
将上面的代码添加到当前主题的 functions.php 文件中即可。
functions.php
本文分享自 作者个人站点/博客 前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文参与 腾讯云自媒体同步曝光计划 ,欢迎热爱写作的你一起参与!