If you are a WordPress user, then you will be familiar with the WordPress Post Author Column, but the Gravatars or Globally Recognized Avatars (more about Gravatars) are not included, but there is a very simple WordPress Trick to include it next to the title itself.
Recently WordPress added the Gravatars to their core code, so now it is very easy for you to add your own customized Gravatar next to your Article Title or your Post Title.
Just Insert the Following code and its as easy as that -
Recently WordPress added the Gravatars to their core code, so now it is very easy for you to add your own customized Gravatar next to your Article Title or your Post Title.
Just Insert the Following code and its as easy as that -
<?php echo get_avatar( get_the_author_email(), '80' ); ?>
Here is an example -
You can implement that code wherever you want, it does not have to be next to the title itself. Be Creative with that!
Use of Gravatar is necessary only when you run a multi-author blog, as if you are a single author you can just have a thumbnail and about column in the sidebar itself like Amit Agarwal at labnol.But if you do run a multi-author blog then this aspect can be very useful indeed.
If you have any doubts please leave a comment, I will get back to you soon.
0 comments:
Post a Comment
This is a PR 4 Do-Follow Blog, so please give us valuable feedback and not Spam!