0
votes

I am using FishPig extension to integrate wordpress in magento everything is ok.. now i want to display author gravatar in every post & also on homepage a small author image under title of every post. here is blog url - www.postmygreetings.com/blog/

Edit:

I am using this code to display author name, post date and tags under every post on homepage now i also want to display small author image:

<?php echo stripslashes($this->__('This entry was posted in %s and tagged %s on %s<span class=\"by-author\"> by %s</span>.', 
         $this->getCategoryString($post), 
         $this->getTagString($post), 
         $post->getPostDate(), 
         $post->getAuthor()->getDisplayName())
  ) ?>
1
can you share the code where you want the gravatar to be displayed? please include in it the code that you use to get post title, getting the authors image is similarjnhghy - Alexandru Jantea
I am using this code to display author name, post date and tags under every post on homepage now i also want to display small author image <?php echo stripslashes($this->__('This entry was posted in %s and tagged %s on %s<span class=\"by-author\"> by %s</span>.', $this->getCategoryString($post), $this->getTagString($post), $post->getPostDate(), $post->getAuthor()->getDisplayName())) ?>Satinder Singh

1 Answers

1
votes

To get the users avatar you'll have to create a function similar to wordpress get_avatar you can find it's code here.

After you have this function just call it with the correct argumets and it should work...

You get the argumets from objects that you can already use like

$post->getAuthor()->getDisplayName())