Hey, I’m digging up this thread, just in case somebody found a solution to the problem.
I can’t get the image to show up in the author page, the gravatar somehow takes priority on it and the url shown is that of the gravatar, not the custom user image.
Basically, this is my author page :
<?php
/*
Template Name: Auteur
*/
get_header(); ?>
<!-- This sets the $curauth variable -->
<?php
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
?>
<div id="content" class="<?php echo $curauth->user_nicename; ?>">
<h1><?php echo $curauth->nickname; ?></h1>
<dl>
<dt>Site internet : </dt>
<dd><a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a></dd>
<dt>Biographie : </dt>
<dd><?php echo $curauth->user_description; ?></dd>
</dl>
<h2>Les articles de <?php echo $curauth->nickname; ?> :</h2>
<ul>
<!-- The Loop -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
<?php the_title(); ?></a>,
<?php the_time('d M Y'); ?> dans <?php the_category('&');?>
</li>
<?php endwhile; else: ?>
<p><?php _e('Aucun article trouvé pour cet auteur.'); ?></p>
<?php endif; ?>
<!-- End Loop -->
</ul>
<?php
echo get_avatar(get_the_author_meta('ID'), 200);
?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
(I was using the global $post code before, but I realized it actually didn’t matter, it’s working without it)
The place where I have my call for the avatar is the only place where I can get the picture I want. If I try to place the code somewhere else, I get a blank image with an url from the gravatar website.
I tried, of course, with the global $post.
Nothing worked.
So the image is stuck at the bottom of the page, which is, of course, not where I want it.
What is wrong?