{"id":2739,"date":"2026-09-20T16:04:26","date_gmt":"2026-09-20T14:04:26","guid":{"rendered":"https:\/\/www.molongui.com\/help\/?p=2739"},"modified":"2026-09-20T16:04:27","modified_gmt":"2026-09-20T14:04:27","slug":"how-avatar-fallbacks-work-in-molongui_author_avatar","status":"publish","type":"post","link":"https:\/\/www.molongui.com\/help\/how-avatar-fallbacks-work-in-molongui_author_avatar\/","title":{"rendered":"How Avatar Fallbacks Work in [molongui_author_avatar]"},"content":{"rendered":"\n<p>The <code>default<\/code> attribute in <code>[molongui_author_avatar]<\/code> lets you control what should be displayed when the requested avatar source is not available.<\/p>\n\n\n\n<p>It is especially useful together with the <code>source<\/code> attribute when you want predictable fallback behavior for a specific shortcode.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use an acronym as the fallback<\/h2>\n\n\n\n<p>To display an acronym when the requested avatar is unavailable, use:<\/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>The shortcode will use:<\/p>\n\n\n\n<p><strong>Gravatar \u2192 Acronym<\/strong><\/p>\n\n\n\n<p>You can do the same with a Local Avatar:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;molongui_author_avatar source=\"local\" default=\"acronym\"]<\/code><\/pre>\n\n\n\n<p>This results in:<\/p>\n\n\n\n<p><strong>Local Avatar \u2192 Acronym<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Display nothing when the avatar is unavailable<\/h2>\n\n\n\n<p>Use <code>default=\"none\"<\/code> when you do not want any fallback to be displayed.<\/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=\"none\"]<\/code><\/pre>\n\n\n\n<p>This results in:<\/p>\n\n\n\n<p><strong>Gravatar \u2192 No Avatar<\/strong><\/p>\n\n\n\n<p>Likewise:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;molongui_author_avatar source=\"local\" default=\"none\"]<\/code><\/pre>\n\n\n\n<p>results in:<\/p>\n\n\n\n<p><strong>Local Avatar \u2192 No Avatar<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What happens if you do not specify a default?<\/h2>\n\n\n\n<p>When you explicitly choose an avatar source but do not specify a <code>default<\/code>, Molongui Authorship uses its normal fallback behavior for that source.<\/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\"]<\/code><\/pre>\n\n\n\n<p>If Gravatar is enabled, the usual fallback is:<\/p>\n\n\n\n<p><strong>Gravatar \u2192 Custom Default Avatar \u2192 WordPress Default Avatar<\/strong><\/p>\n\n\n\n<p>The Custom Default Avatar is used when it is enabled and configured. If it is disabled, the Default Avatar configured in WordPress can be used instead.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Fallback behavior with a Local Avatar<\/h2>\n\n\n\n<p>When you use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;molongui_author_avatar source=\"local\"]<\/code><\/pre>\n\n\n\n<p>Molongui Authorship prefers the Local Avatar and continues through the normal image fallback chain when no local image is available:<\/p>\n\n\n\n<p><strong>Local Avatar \u2192 Gravatar \u2192 Custom Default Avatar \u2192 WordPress Default Avatar<\/strong><\/p>\n\n\n\n<p>Only sources enabled in your global avatar settings can be used.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using source=&#8221;auto&#8221;<\/h2>\n\n\n\n<p>With:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;molongui_author_avatar source=\"auto\"]<\/code><\/pre>\n\n\n\n<p>Molongui Authorship uses the standard avatar resolution configured for your site.<\/p>\n\n\n\n<p>With all avatar options enabled, the normal priority is:<\/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 remains enabled, WordPress&#8217; configured Default Avatar can be used as the final Gravatar fallback.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Global settings always take priority<\/h2>\n\n\n\n<p>The settings under <strong>Authors &gt; Settings &gt; General<\/strong> act as master switches.<\/p>\n\n\n\n<p>For example, this shortcode:<\/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>cannot force a Gravatar request if Gravatar has been disabled globally.<\/p>\n\n\n\n<p>Likewise, <code>source=\"local\"<\/code> cannot force the use of Local Avatars when Local Author Avatars are disabled globally.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Quick examples<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[molongui_author_avatar source=\"gravatar\" default=\"acronym\"]<\/code> \u2014 Gravatar first, Acronym otherwise.<\/li>\n\n\n\n<li><code>[molongui_author_avatar source=\"gravatar\" default=\"none\"]<\/code> \u2014 Gravatar first, nothing otherwise.<\/li>\n\n\n\n<li><code>[molongui_author_avatar source=\"local\" default=\"acronym\"]<\/code> \u2014 Local Avatar first, Acronym otherwise.<\/li>\n\n\n\n<li><code>[molongui_author_avatar source=\"local\" default=\"none\"]<\/code> \u2014 Local Avatar first, nothing otherwise.<\/li>\n\n\n\n<li><code>[molongui_author_avatar source=\"acronym\"]<\/code> \u2014 Always display the generated acronym.<\/li>\n\n\n\n<li><code>[molongui_author_avatar source=\"auto\"]<\/code> \u2014 Use the normal Molongui Authorship avatar resolution.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What about existing shortcodes?<\/h2>\n\n\n\n<p>The <code>source<\/code> attribute is optional.<\/p>\n\n\n\n<p>Existing shortcodes that do not specify <code>source<\/code> keep their previous behavior for backward compatibility.<\/p>\n\n\n\n<p>If you want to use the new global avatar resolution explicitly, use <code>source=\"auto\"<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The default attribute in [molongui_author_avatar] lets you control what should be displayed when the requested avatar source is not available. It is especially useful together with the source attribute when you want predictable fallback behavior for a specific shortcode. Use an acronym as the fallback To display an acronym when the requested avatar is unavailable, [&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-2739","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\/2739","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=2739"}],"version-history":[{"count":1,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts\/2739\/revisions"}],"predecessor-version":[{"id":2740,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/posts\/2739\/revisions\/2740"}],"wp:attachment":[{"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/media?parent=2739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/categories?post=2739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.molongui.com\/help\/wp-json\/wp\/v2\/tags?post=2739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}