I want to display author gravatar on posts. How to do this?
If you’re in the Loop: echo get_avatar( get_the_author_meta(‘ID’) );
If you’re in the Loop: echo get_avatar( get_the_author_meta(‘ID’) );
I think the problem is simply that your default avatar isn’t publicly available. Try for example http://upload.wikimedia.org/wikipedia/en/b/b0/Avatar-Teaser-Poster.jpg instead of http://loalhost:888/wordpress/wp-content/themes/blog-theme/img/icons/avatar.jpg Notice that the default gravatar is served via http{|s}://i{0,1,2}.wp.com/… From the docs: When you include a default image, Gravatar will automatically serve up that image if there is no image associated with the requested email … Read more