{"id":337,"date":"2011-08-05T14:12:26","date_gmt":"2011-08-05T14:12:26","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=337"},"modified":"2011-08-05T14:12:26","modified_gmt":"2011-08-05T14:12:26","slug":"wordpress-get_avatar-not-working","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/wordpress-get_avatar-not-working\/","title":{"rendered":"WordPress get_avatar isn&#8217;t working"},"content":{"rendered":"<p>There are a couple things you can try if the author avatar isn&#39;t displaying.<\/p>\n<ol>\n<li>Check the first parameter. WordPress deprecated <i>get_the_author_id() <br \/>\n\t\t<\/i>a while ago, so depending on your version of WordPress, they may have removed this function.<br \/>\n\t\tTry replacing it with: <em>get_the_author_meta(&#39;user_email&#39;)<\/em><\/li>\n<li>You might be trying to display the avatar at a larger size than the original. Get the size of the image directly from your users page (<code>\/wp-admin\/users.php<\/code>), then try displaying the avatar at that size.<br \/>\n\t\tFor example, if your avatar is only 32 pixels wide\/high, try the following:<\/li>\n<\/ol>\n<p><code>&lt;?php echo <a class=\"target-blank\" href=\"http:\/\/codex.wordpress.org\/Function_Reference\/get_avatar\">get_avatar<\/a>( get_the_author_meta( &#39;user_email&#39; ), <br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; apply_filters( &#39;twentyten_author_bio_avatar_size&#39;, 32 ) ); ?&gt;<br \/>\n\t<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are a couple things you can try if the author avatar isn&#39;t displaying. Check the first parameter. WordPress deprecated get_the_author_id() a while ago, so&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[103],"tags":[],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/337"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=337"}],"version-history":[{"count":0,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/337\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}