¿Quieres añadir tu feed de Mastodon en una página de WordPress?
- Instala y activa el plugin Include Mastodon Feed.
- Inserta el shortcode siguiente en cualquier ubicación de tu sitio web de WordPress:
[include-mastodon-feed instance="YOUR-INSTANCE" account="YOUR-ACCOUNT-ID"]
Donde YOUR-INSTANCE es el dominio completo de tu instancia (sin HTTP/HTTPS).
Obtención de YOUR-ACCOUNT-ID
Una manera fácil de obtener el ID de tu cuenta de Mastodon es mediante la siguiente URL:
https://yourinstance.com/api/v2/search?q=yourusername@yourinstance.com&resolve=true&limit=5
Donde yourinstance.com es el dominio completo de tu instancia y yourusername es el nombre de tu usuario (incluyendo @).
Atributos del Shortcode
- account (obligatorio)
The account ID (a long number – see FAQ on how to get it) - instance (obligatorio)
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) - 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) - 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: {})