How to make login and password with WordPress
Copy this code and paste it in your HTML
<div id="barra-login">
<p>
<?php global $user_ID;
if ( $user_ID ) : ?>
<?php global $current_user; get_currentuserinfo
();
?> <?php
if( !empty($current_user->display_name) ){ $nome = $current_user->display_name;
} elseif( !empty($current_user->first_name) && !empty($current_user->last_name) ){ $nome = $current_user->first_name." ".$current_user->last_name;
} else {
$nome = $current_user->user_login;
}
?>
Welcome, <strong>
<?php echo $nome;
?></strong>
[ <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> ]
<?php else : ?>
<strong>Welcome Visitor!</strong> [ <a href="
<?php echo get_option
('siteurl');
?>/wp-login.php?action=register&redirect_to=
<?php echo get_option
('home')?>/my-information/">Join us</a> | <a href="
<?php echo get_option
('siteurl');
?>/wp-login.php">Log</a> ]
<?php endif; ?>
</p>
</div>
Report this snippet