Gravatar is “Posts” ?
-
In my code (index.php) I have this:
<h3 class=”storytitle” id=”post-<?php the_ID(); ?>”><img src=”<?php gravatar(the_author_email) ?>” alt=”Gravatar” />” rel=”bookmark”><?php the_title(); ?></h3>
But the part I want to concentrate on is :
<img src=”<?php gravatar(the_author_email) ?>” alt=”Gravatar” />Now as you know this is in the loop but when I use it the deafult avatar is shown. (Im using Skippy’s Gravatar Plug-in)
Now when I type in <img src=”<?php gravatar([email protected]) ?>” alt=”Gravatar” /> the gravatar shows up. Why doesn’t the “the_author_email” work?
EDIT:
Changing this
the_author_email
to
<?php the_author_email(); ?>gives this error
Parse error: parse error, unexpected ‘<‘, expecting ‘)’ in /…/index.php on line 9
EDIT:
I also tried this:<?php if (have_posts()) : while (have_posts()) : the_post();
$email = ‘<?php the_author_email(); ?>’;
?><div class=”post”>
<h3 class=”storytitle” id=”post-<?php the_ID(); ?>”><img src=”<?php gravatar($email) ?>” alt=”Gravatar” />” rel=”bookmark”><?php the_title(); ?></h3>Which didnt work
EDIT:
<?php if (have_posts()) : while (have_posts()) : the_post();
$email = ‘[email protected]’;
?><div class=”post”>
<h3 class=”storytitle” id=”post-<?php the_ID(); ?>”><img src=”<?php gravatar($email) ?>” alt=”Gravatar” />” rel=”bookmark”><?php the_title(); ?></h3>That worked
SUMMARY: Looks like the_author_email doesnt work
EDIT:
<?php if (have_posts()) : while (have_posts()) : the_post();
$email = ‘echo (<?php the_author_email();?>’;
?>Didnt work either
- The topic ‘Gravatar is “Posts” ?’ is closed to new replies.