{"id":59,"date":"2011-11-07T16:13:49","date_gmt":"2011-11-07T21:13:49","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2011\/11\/07\/show-author-avatar\/"},"modified":"2022-02-23T11:34:18","modified_gmt":"2022-02-23T16:34:18","slug":"show-author-avatar","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/","title":{"rendered":"How to show an author&#8217;s avatar within WordPress"},"content":{"rendered":"<p><!-- How to show an author's avatar within WordPress --><\/p>\n<p>If you&#8217;d like to <strong>show the author&#8217;s avatar within a WordPress post<\/strong>, we&#8217;ll show you how in this article. While the functionality is not built into WordPress (version 3.2.1 as of this writing), you can surprisingly accomplish this task with just one line of code.<\/p>\n<p>In this article, we&#8217;ll update the top part of the post that says &#8220;Posted on&#8221; so that it shows the author&#8217;s avatar. Refer to the screenshots below to see the results.<\/p>\n<p>In this article, you will learn <strong>how to show an author&#8217;s avatar within WordPress<\/strong>.<\/p>\n<p><span style=\"color: inherit; font-size: 1.95em; font-weight: 600;\">Showing an Author&#8217;s Avatar in WordPress<\/span><\/p>\n<ol class=\"article_list\">\n<li><a href=\"\/support\/edu\/wordpress\/logging-into-wordpress-dashboard\/\">Log into your WordPress Dashboard<\/a><\/li>\n<li>In the left menu, under &#8220;Appearance&#8221;, click &#8220;Editor&#8221;<\/li>\n<li>On the &#8220;Editor&#8221; page, find and click &#8220;content.php&#8221; in the list of files on the right of the page<\/li>\n<li>\n<div>Find this section of code:<\/div>\n<div class=\"entry-meta\">&lt;?php twentyeleven_posted_on(); ?&gt;<\/div>\n<p>&#8230; and replace it with this:<\/p>\n<div class=\"entry-meta\">\n<pre class=\"code_block\">&lt;? echo get_avatar( get_the_author_meta('user_email'), $size = '50'); ?&gt; &lt;?php twentyeleven_posted_on(); ?&gt;\n        <!-- .entry-meta --><\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<p>That&#8217;s it, you&#8217;re done! In this tutorial we placed the author&#8217;s avatar at the top of the post (for the homepage). If you&#8217;d like show the author&#8217;s avatar from anywhere else within the post (or on other pages), simply use the following code:<\/p>\n<pre class=\"code_block\">   &lt;? echo get_avatar( get_the_author_meta('user_email'), $size = '50'); ?&gt;<\/pre>\n<p>Congratulations, now you know how to show an author&#8217;s avatar within WordPress!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;d like to show the author&#8217;s avatar within a WordPress post, we&#8217;ll show you how in this article. While the functionality is not built into WordPress (version 3.2.1 as of this writing), you can surprisingly accomplish this task with just one line of code. In this article, we&#8217;ll update the top part of the<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/\"> Read More ><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[56],"tags":[],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Show an Author\u2019s Avatar in WordPress<\/title>\n<meta name=\"description\" content=\"In this tutorial, we&#039;ll show you how to use WordPress&#039; get_avatar to show an author&#039;s avatar on their post.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Show an Author\u2019s Avatar in WordPress\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we&#039;ll show you how to use WordPress&#039; get_avatar to show an author&#039;s avatar on their post.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-11-07T21:13:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-23T16:34:18+00:00\" \/>\n<meta name=\"author\" content=\"Brad Markle\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brad Markle\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/\"},\"author\":{\"name\":\"Brad Markle\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf\"},\"headline\":\"How to show an author&#8217;s avatar within WordPress\",\"datePublished\":\"2011-11-07T21:13:49+00:00\",\"dateModified\":\"2022-02-23T16:34:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/\"},\"wordCount\":221,\"commentCount\":19,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"WordPress Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/\",\"name\":\"How to Show an Author\u2019s Avatar in WordPress\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2011-11-07T21:13:49+00:00\",\"dateModified\":\"2022-02-23T16:34:18+00:00\",\"description\":\"In this tutorial, we'll show you how to use WordPress' get_avatar to show an author's avatar on their post.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to show an author&#8217;s avatar within WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf\",\"name\":\"Brad Markle\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/bradm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Show an Author\u2019s Avatar in WordPress","description":"In this tutorial, we'll show you how to use WordPress' get_avatar to show an author's avatar on their post.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/","og_locale":"en_US","og_type":"article","og_title":"How to Show an Author\u2019s Avatar in WordPress","og_description":"In this tutorial, we'll show you how to use WordPress' get_avatar to show an author's avatar on their post.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2011-11-07T21:13:49+00:00","article_modified_time":"2022-02-23T16:34:18+00:00","author":"Brad Markle","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Brad Markle","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/"},"author":{"name":"Brad Markle","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf"},"headline":"How to show an author&#8217;s avatar within WordPress","datePublished":"2011-11-07T21:13:49+00:00","dateModified":"2022-02-23T16:34:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/"},"wordCount":221,"commentCount":19,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["WordPress Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/","name":"How to Show an Author\u2019s Avatar in WordPress","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2011-11-07T21:13:49+00:00","dateModified":"2022-02-23T16:34:18+00:00","description":"In this tutorial, we'll show you how to use WordPress' get_avatar to show an author's avatar on their post.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/show-author-avatar\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to show an author&#8217;s avatar within WordPress"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf","name":"Brad Markle","url":"https:\/\/www.inmotionhosting.com\/support\/author\/bradm\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":6,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":86488,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/59\/revisions\/86488"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}