How to Display an Author Avatar with the [molongui_author_avatar] Shortcode

Molongui » Help » Molongui Authorship Docs » How to Display an Author Avatar with the [molongui_author_avatar] Shortcode

Molongui Authorship Pro provides the [molongui_author_avatar] shortcode to display an author’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 to appear:

[molongui_author_avatar]

Molongui Authorship will resolve the avatar using the shortcode’s standard avatar behavior and your current avatar settings.

Choose the avatar size

You can use the size attribute to specify the avatar size in pixels.

For example:

[molongui_author_avatar size="150"]

This displays the avatar at the requested size.

Choose the avatar source

You can explicitly control which avatar source the shortcode should use with the source attribute.

Available values are:

  • auto — Use Molongui Authorship’s normal avatar resolution logic.
  • local — Prefer the author’s locally uploaded avatar.
  • gravatar — Prefer the Gravatar associated with the author’s email address.
  • acronym — Display an acronym generated from the author’s name.

For example:

[molongui_author_avatar source="local"]

or:

[molongui_author_avatar source="gravatar"]

The global avatar settings under Authors > Settings > General still act as master switches. For example, requesting source="gravatar" does not re-enable Gravatar if Gravatar has been disabled globally.

Choose what happens when the requested avatar is unavailable

The default attribute lets you define the fallback behavior for supported avatar sources.

For example:

[molongui_author_avatar source="gravatar" default="acronym"]

If the author has no Gravatar, an acronym is displayed instead.

To display nothing when the requested avatar is unavailable:

[molongui_author_avatar source="gravatar" default="none"]

Use the automatic avatar resolution

If you want Molongui Authorship to choose the most appropriate avatar according to your global configuration, use:

[molongui_author_avatar source="auto"]

With all avatar sources enabled, the normal resolution usually follows this order:

Local Avatar → Gravatar → Custom Default Avatar

If the Custom Default Avatar is disabled while Gravatar is enabled, the WordPress Default Avatar can be used as the Gravatar fallback.

Existing shortcodes remain compatible

The source attribute is optional.

Existing uses of [molongui_author_avatar] without a source attribute keep their previous behavior, including their existing fallback configuration.

Need more control?

See the dedicated guides on choosing an avatar source and configuring avatar fallbacks for more examples of the source and default attributes.

Updated on September 20, 2026

Did not find a solution? We are here to help you succeed.
Open a support ticket