Posted By

standardspace on 06/21/11


Tagged

wordpress


Versions (?)

Conditional Wordprss login/logout


 / Published in: PHP
 

URL: http://wordpress.org/support/topic/conditional-loginlogout-link

  1. <?php
  2. if ( is_user_logged_in() ) {
  3. echo '<a href="'.wp_logout_url( get_permalink() ).'" title="Logout" class="hunderline">Logout</a>';
  4. } else {
  5. echo wp_login_form( $args );
  6. }
  7. ?>

Report this snippet  

You need to login to post a comment.