Posted By

tcelestino on 11/21/10


Tagged

wordpress


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vehler


How to make login and password with WordPress


 / Published in: PHP
 

  1. <div id="barra-login">
  2.  
  3. <p>
  4.  
  5. <?php global $user_ID; if ( $user_ID ) : ?>
  6.  
  7. <?php global $current_user; get_currentuserinfo(); ?>
  8. <?php
  9. if( !empty($current_user->display_name) ){
  10. $nome = $current_user->display_name;
  11. } elseif( !empty($current_user->first_name) && !empty($current_user->last_name) ){
  12. $nome = $current_user->first_name." ".$current_user->last_name;
  13. } else {
  14. $nome = $current_user->user_login;
  15. }
  16. ?>
  17. Welcome, <strong><?php echo $nome; ?></strong>
  18. [ <a href="<?php echo get_option('home')?>/painel/">My Dashboard</a> | <a href="<?php echo wp_logout_url( htmlentities(get_option('home')) ); ?>" title="Logout">Logout</a> ]
  19.  
  20. <?php else : ?>
  21.  
  22. <strong>Welcome Visitor!</strong> [ <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=register&amp;redirect_to=<?php echo get_option('home')?>/my-information/">Join us</a> | <a href="<?php echo get_option('siteurl'); ?>/wp-login.php">Log</a> ]
  23.  
  24. <?php endif; ?>
  25.  
  26. </p>
  27.  
  28. </div>

Report this snippet  

You need to login to post a comment.