- Upload the "include-mastodon-feed" directory to the "/wp-content/plugins/" directory.
- Activate the plugin through the "Plugins" menu in WordPress.
- Insert shortcode into any page.
Shortcode example
[include-mastodon-feed instance="YOUR-INSTANCE" account="YOUR-ACCOUNT-ID"]
Shortcode attributes
- account (required)
The account ID (a long number - see FAQ on how to get it)
- tag
Use tag instead of account if you want to embed a tag feed instead of a personal feed
- instance (required)
Domain name of the instance without https:// (e.g. example.org)
- limit
Maximum number of statuses (Default: 20)
- excludeReplies
Exclude replies to other accounts (Default: false)
- excludeConversationStarters
Exclude statuses that start with a user mention (Default: false)
- excludeBoosts
Exclude boosted statuses (Default: false)
- onlyPinned
Show only pinned statuses (Default: false)
- onlyMedia
Show only statuses containing media (Default: false)
- preserveImageAspectRatio
Preserve image aspect ratio (Default: false)
- tagged
Show only statuses that are tagged with given tag name (Default: false)
No leading #, case insensitive, e.g.: tagged="tagname"
- linkTarget
Target for all links e.g. new tab would be "_blank" (Default: _self)
- showPreviewCards
Show preview cards (Default: true)
- hideStatusMeta
Hide status meta information, automatically also hides date and time (Default: false)
- hideDateTime
Hide date and time from status meta information (Default: false)
- darkmode
Enable dark mode (Default: false)
- text-loading
Loading text (Default: Loading Mastodon feed...)
- text-noStatuses
Text if no statuses are available (Default: No statuses available)
- text-boosted
Text indicating boosted statuses (Default: boosted 🚀)
- text-viewOnInstance
View status on instance link text (Default: view on instance)
- text-showContent
Text for content warning buttons (Default: Show content)
- text-permalinkPre
Text before post permalink (date & time) (Default: on)
- text-permalinkPost
Text after post permalink (date & time) (Default: )
- text-edited
Text indicating edited posts (Default: (edited))
- date-locale
Locale for date string, used in toLocaleString() (Default: en-US)
- date-options
Format options directly fed into toLocaleString() (Default: {})
Additional customizations
You can define several plugin constants to set custom default options that will be applied site-wide.
- Open your
wp-config.php
file
- Search for the line
/* Add any custom values between this line and the "stop editing" line. */
- Define the options you want to override between the line from step #2 and
/* That's all, stop editing! Happy publishing. */
See the included
config-example.php
file for a full list of supported settings.