{"id":2735,"date":"2026-09-20T16:02:17","date_gmt":"2026-09-20T14:02:17","guid":{"rendered":"https:\/\/www.molongui.com\/help\/?p=2735"},"modified":"2026-09-20T16:02:38","modified_gmt":"2026-09-20T14:02:38","slug":"how-to-display-an-author-avatar-with-the-molongui_author_avatar-shortcode","status":"publish","type":"post","link":"https:\/\/www.molongui.com\/help\/how-to-display-an-author-avatar-with-the-molongui_author_avatar-shortcode\/","title":{"rendered":"How to Display an Author Avatar with the [molongui_author_avatar] Shortcode"},"content":{"rendered":"\n<p>Molongui Authorship Pro provides the <code>[molongui_author_avatar]<\/code> shortcode to display an author&#8217;s avatar anywhere shortcodes are supported.<\/p>\n\n\n\n<p>This is useful when you want to show an author avatar outside the Author Box, such as in a custom page, template, sidebar, or content block.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Display an author avatar<\/h2>\n\n\n\n<p>Add the following shortcode where you want the avatar to appear:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;molongui_author_avatar]<\/code><\/pre>\n\n\n\n<p>Molongui Authorship will resolve the avatar using the shortcode&#8217;s standard avatar behavior and your current avatar settings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Choose the avatar size<\/h2>\n\n\n\n<p>You can use the <code>size<\/code> attribute to specify the avatar size in pixels.<\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;molongui_author_avatar size=\"150\"]<\/code><\/pre>\n\n\n\n<p>This displays the avatar at the requested size.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Choose the avatar source<\/h2>\n\n\n\n<p>You can explicitly control which avatar source the shortcode should use with the <code>source<\/code> attribute.<\/p>\n\n\n\n<p>Available values are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>auto<\/code> \u2014 Use Molongui Authorship&#8217;s normal avatar resolution logic.<\/li>\n\n\n\n<li><code>local<\/code> \u2014 Prefer the author&#8217;s locally uploaded avatar.<\/li>\n\n\n\n<li><code>gravatar<\/code> \u2014 Prefer the Gravatar associated with the author&#8217;s email address.<\/li>\n\n\n\n<li><code>acronym<\/code> \u2014 Display an acronym generated from the author&#8217;s name.<\/li>\n<\/ul>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;molongui_author_avatar source=\"local\"]<\/code><\/pre>\n\n\n\n<p>or:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;molongui_author_avatar source=\"gravatar\"]<\/code><\/pre>\n\n\n\n<p>The global avatar settings under <strong>Authors &gt; Settings &gt; General<\/strong> still act as master switches. For example, requesting <code>source=\"gravatar\"<\/code> does not re-enable Gravatar if Gravatar has been disabled globally.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Choose what happens when the requested avatar is unavailable<\/h2>\n\n\n\n<p>The <code>default<\/code> attribute lets you define the fallback behavior for supported avatar sources.<\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;molongui_author_avatar source=\"gravatar\" default=\"acronym\"]<\/code><\/pre>\n\n\n\n<p>If the author has no Gravatar, an acronym is displayed instead.<\/p>\n\n\n\n<p>To display nothing when the requested avatar is unavailable:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;molongui_author_avatar source=\"gravatar\" default=\"none\"]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Use the automatic avatar resolution<\/h2>\n\n\n\n<p>If you want Molongui Authorship to choose the most appropriate avatar according to your global configuration, use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;molongui_author_avatar source=\"auto\"]<\/code><\/pre>\n\n\n\n<p>With all avatar sources enabled, the normal resolution usually follows this order:<\/p>\n\n\n\n<p><strong>Local Avatar \u2192 Gravatar \u2192 Custom Default Avatar<\/strong><\/p>\n\n\n\n<p>If the Custom Default Avatar is disabled while Gravatar is enabled, the WordPress Default Avatar can be used as the Gravatar fallback.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Existing shortcodes remain compatible<\/h2>\n\n\n\n<p>The <code>source<\/code> attribute is optional.<\/p>\n\n\n\n<p>Existing uses of <code>[molongui_author_avatar]<\/code> without a <code>source<\/code> attribute keep their previous behavior, including their existing fallback configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Need more control?<\/h2>\n\n\n\n<p>See the dedicated guides on choosing an avatar source and configuring avatar fallbacks for more examples of the <code>source<\/code> and <code>default<\/code> attributes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Molongui Authorship Pro provides the [molongui_author_avatar] shortcode to display an author&#8217;s avatar anywhere shortcodes are supported. This is useful when you want to show an author avatar outside the Author Box, such as in a custom page, template, sidebar, or content block. Display an author avatar Add the following shortcode where you want the avatar [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,1],"tags":[61,12,19],"class_list":["post-2735","post","type-post","status-publish","format-standard","hentry","category-authorship","category-doc","tag-avatar","tag-howto","tag-shortcodes"],"_links":{"self":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts\/2735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/comments?post=2735"}],"version-history":[{"count":1,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts\/2735\/revisions"}],"predecessor-version":[{"id":2736,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts\/2735\/revisions\/2736"}],"wp:attachment":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/media?parent=2735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/categories?post=2735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/tags?post=2735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}