• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
  • Main Site
  • About Us
  • Services
  • Contact Us
  • Blog
BizBudding Docs

BizBudding Docs

Documentation

  • Mai Theme Docs
    • Mai Themes (v2)
  • Classic Theme Docs
    • Pretty Darn Cute
    • SEO Themes
    • Mai Theme (Classic)
  • Search
Home » MT Docs » Shortcodes » Mai Avatar [mai_avatar] Shortcode

Mai Avatar [mai_avatar] Shortcode

Knowledgebase: Shortcodes
Table of Contents[Hide][Show]
  • id
  • size
  • display
  • margin_top
  • margin_bottom
  • margin_left
  • margin_right

Our Mai Avatar shortcode allows you to display a post author’s avatar in your header or footer meta, inside your content, template parts, or anywhere shortcodes can be used.

The example below adds the [mai_avatar] shortcode to the Header Meta text field in Customizer > Theme Settings > Single Content > Post.

Blog post with author avatar and post date

Here are the available parameters to custom your avatar display.

id

The id parameter defaults to "current" and also accepts a user ID.

Examples:

[mai_avatar]

This is the same as the first example:

[mai_avatar id="current"]

This displays an avatar for the user with an id of 1234:

[mai_menu id="1234"]

size

The size to display the avatar. Accepts any unit value (px, em, rem, %, etc).

Examples:

[mai_avatar size="40px"]

display

Accepts any CSS display property. This is typically not used.

Examples:

[mai_avatar display="inline"]

margin_top

Adds top margin to the avatar. Accepts any unit value (px, em, rem, %, etc).

margin_bottom

Adds bottom margin to the avatar. Accepts any unit value (px, em, rem, %, etc).

margin_left

Adds left margin to the avatar. Accepts any unit value (px, em, rem, %, etc).

margin_right

Adds right margin to the avatar. Accepts any unit value (px, em, rem, %, etc).

Previous Post: « Mai Cart Total [mai_cart_total] Shortcode
Next Post: Mai Price [mai_price] Shortcode »
bizbudding team

Need some help with your theme?

Open a support request by filling out our support form.

Get Support

Sidebar

Knowledgebase

First Steps

Menus

Content Areas

Customizer

Blocks

Shortcodes

Advanced/Developers

Plugins




BizBudding icon

Resources

  • Shop
  • Affiliates
  • Data Protection
  • Privacy Policy
  • Terms & Conditions
  • Contact Us

quick links

  • Main Site
  • About Us
  • Services
  • Contact Us
  • Blog

Contact Details

1001 County Road 517, Suite 1
Hackettstown, NJ 07840

(877) 548-2440

Contact Us


  • Mai Theme Docs
    • Mai Themes (v2)
  • Classic Theme Docs
    • Pretty Darn Cute
    • SEO Themes
    • Mai Theme (Classic)
  • Search

Copyright © 2010–2021 BizBudding Inc. · All Rights Reserved ♥ Work hard and be nice to people.