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

WBOY
Release: 2016-06-02 11:27:56
Original
1484 people have browsed it

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>
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!