Shortcodes
Shortcodes Guide
Mastodon Button Shortcode
Display a Mastodon button on your site:
[mastodon_button]
Available Attributes:
url- Mastodon profile URL (default: auto-detected)text- Button text (default: "Follow on Mastodon")style- Button style: button, link, icon, modern, minimal, rounded, outline, gradient, pill, white, black (default: primary)size- Button size: small, medium, large (default: medium)icon- Show icon: true, false (default: true)icon_color- Icon color: default, black, gray, red, white, green, purple (default: default)class- Custom CSS class
Compatibility: Compatible with Gutenberg, Elementor, and other page builders. Responsive and mobile-friendly design.
Examples:
[mastodon_button style="outline" size="large"]
[mastodon_button icon="true" icon_color="black"]
[mastodon_button url="https://social.5th.ro/@username" text="Follow me"]
Mastodon Feed Shortcode
Display your Mastodon feed on your site (in sidebars, widgets, posts, or pages):
[mastodon_feed]
Available Attributes:
username- Mastodon username (default: auto-detected from token)instance- Mastodon instance URL (default: social.5th.ro)count- Number of posts to display (default: 5, max: 10)layout- Layout: default, compact, grid (default: default)cache_time- Cache time in seconds (default: 600)exclude_replies- Exclude replies: true, false (default: false)exclude_reblogs- Exclude reblogs: true, false (default: false)only_media- Only media posts: true, false (default: false)
Examples:
[mastodon_feed count="10" layout="grid"]
[mastodon_feed username="pr360" instance="https://social.5th.ro"]
[mastodon_feed count="3" cache_time="300"]
[mastodon_feed exclude_replies="true" exclude_reblogs="true"]
[mastodon_feed only_media="true" layout="grid"]
Note: The shortcode supports personal feeds and tag feeds. Data is cached for better performance.