Hello!
On my front page, I have this code to log in:
<!-- If User Is Logged In Display This -->
<?php if (is_user_logged_in()) { ?>
Bienvenue <strong><font size="2pt" color="#ff0000"><?php echo $user_identity ?></font></strong>!
<form name="loginform" id="loginform" action="<?php echo wp_logout_url(); ?>" method="post">
<?php wp_register(); ?>
<input type="submit" name="wp-submit" id="wp-submit" value="Se déconnecter" />
<input type="hidden" name="redirect_to" value="<?php bloginfo('url'); ?>" />
</form>
</p>
<!-- If User Is NOT Logged In Display This -->
<? } else { ?>
<form name="loginform" id="loginform" action="<?php bloginfo('url'); ?>/wp-login.php" method="post">
<label for="log">Pseudo</label> <input type="text" name="log" id="user_login" class="input" value="" size="20" tabindex="10" />
<label for="pwd">Mot de Passe</label> <input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" />
<input type="submit" name="wp-submit" id="wp-submit" value="LOG IN" /> </p>
<a href="wp-signup.php">Crée ton Blog !</a>
<a href="<?php bloginfo('url'); ?>/wp-login.php?action=lostpassword">Mot de Passe perdu?</a>
<input type="hidden" name="redirect_to" value="<?php bloginfo('url'); ?>" />
<input type="hidden" name="testcookie" value="1" />
</form>
<? } ?>
Once logged, there is a message: welcome user
I'd like to show the photo of the user but I don't win the code...
I tried this:
if ($use_grav) {
$grav_img = get_avatar( $thispost[0]->user_email , $grav_size );
$thisgravatar = '<a href="'.$blog_link.'">'.$grav_img.'</a>';
} else { $thisgravatar = ''; }
but it don't show anythig..
If you had an idea the way to do it?
Thank you
(sorry for my English, it's a long long time I didn't use it)