Home  >  Article  >  Backend Development  >  redirect-wordpress php登陆/登出字样切换问题

redirect-wordpress php登陆/登出字样切换问题

WBOY
WBOYOriginal
2016-06-02 11:27:561486browse

redirectphpwordpress

<code>  <?php if(is_user_logged_in())  {  echo '<a href="http://blog.hundunstar.com/login/" title="登入">登陆';  }  else  {  echo '<a href="'.wp_logout_url().'" title="登出">注销?</a>';  wp_safe_redirect( 'http://blog.hundunstar.com/' );  }</code>

?>
这段代码添加在了wordpress主题的sidebar.php里面,但是每次不管有没有登陆,都只有注销字样,怎么回事?而且那个重定向也没有任何用

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn