wordpress登出后重定向

Posted on Posted in wordpress
Tips: 本文创建于2014年10月22日,已超过 2 年,内容或图片可能已经失效!

wordpress登出后重定向到首页,代码

add_action('wp_logout','auto_redirect_after_logout');
function auto_redirect_after_logout(){
  wp_redirect( home_url() );
  exit();
}

把代码放到functions.php中

» 转载请注明来源:若我若鱼 » wordpress登出后重定向

2 thoughts on “wordpress登出后重定向

  1. Safari 10.1.1 Safari 10.1.1 Mac OS X  10.10.5 Mac OS X 10.10.5
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/603.2.5 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.5

    If you wish for to take much from this piece of writing then you have
    to apply such methods to your won weblog.

  2. Safari 11.0.2 Safari 11.0.2 Mac OS X  10.13.2 Mac OS X 10.13.2
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/604.4.7 (KHTML, like Gecko) Version/11.0.2 Safari/604.4.7

    I do not even know how I ended up here, but I thought this post was good.
    I do not know who you are but certainly you’re going to a famous
    blogger if you aren’t already 😉 Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *

2 × three =