Title: Shortcodes empty when post published
Last modified: February 1, 2023

---

# Shortcodes empty when post published

 *  Resolved [cybeardjm](https://wordpress.org/support/users/didierjm/)
 * (@didierjm)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/shortcodes-empty-when-post-published/)
 * Hi,
 * Just updated to the latest version, and enjoyed seeing the new shortcodes (Template
   Tags), as it would allow me to fully customize the output (theoritically).
 * In the Settings, I use the “Custom” post content and “WordPress Post-Format” 
   for the Activity-Object-Type (tried with the “Note (default)” and result’s the
   same).
 *     ```wp-block-code
       <p></img></img> <strong>[ap_title]</strong></p>
   
       <p></img> [ap_permalink type="URL"]?mtm_campaign=TrackingMSTDN&mtm_kwd=DirectAMF&mtm_source=MastodonAP</p>
   
       </img> [ap_excerpt]
   
       <p></img> [ap_hashcats] - [ap_hashtags]</p>
   
       [ap_image]
       ```
   
 * When publishing a new post, the only one working is ap_image. All others don’t
   render their supposed content, but the emojis and Matomo data appear well.
 * ![](https://i0.wp.com/amf.didiermary.fr/wp-content/uploads/2023/02/screenshot-
   2023-02-01-mastodon.png?ssl=1)
 * Tried to empty the site’s cache, tested twice… same result…
 * What am I missing?
 * Sincerely
 * DJM
 * PS: the /img that appear in the code section above are generated by this form
   on wordpress.org, and are not in my original code…
    -  This topic was modified 3 years, 3 months ago by [cybeardjm](https://wordpress.org/support/users/didierjm/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Matthias Pfefferle](https://wordpress.org/support/users/pfefferle/)
 * (@pfefferle)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/shortcodes-empty-when-post-published/#post-16431304)
 * the first thing: you have to write “URL” lowercase: `[ap_permalink type="url"]`!
 * do you have a link, where I can check the output?
    -  This reply was modified 3 years, 3 months ago by [Matthias Pfefferle](https://wordpress.org/support/users/pfefferle/).
    -  This reply was modified 3 years, 3 months ago by [Matthias Pfefferle](https://wordpress.org/support/users/pfefferle/).
 *  Thread Starter [cybeardjm](https://wordpress.org/support/users/didierjm/)
 * (@didierjm)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/shortcodes-empty-when-post-published/#post-16431370)
 * Hi Matthias, link to?
 * If you want to check via Mastodon, it’s cybeardjm [@] amf.didiermary.fr or here
   [https://amf.didiermary.fr/wp-json/activitypub/1.0/users/1/outbox](https://amf.didiermary.fr/wp-json/activitypub/1.0/users/1/outbox)
 * Sincerely
 * DJM
 *  Plugin Author [Matthias Pfefferle](https://wordpress.org/support/users/pfefferle/)
 * (@pfefferle)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/shortcodes-empty-when-post-published/#post-16432095)
 * Fixed in 0.16.1! I am sorry for the hassle!
 *  Thread Starter [cybeardjm](https://wordpress.org/support/users/didierjm/)
 * (@didierjm)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/shortcodes-empty-when-post-published/#post-16434085)
 * Thx Matthias, did more tests and it works as expected.
 * One last remark: I tried both types for [ap_permalink] with my added parameters(?
   mtm_campaign=…)
   url: it’s fine, but not a clickable URLhtml: the permalink is
   clickable, but the parameters are outside the link, as text.
 * For comparison, I use another plugin to send updated posts to Mastodon (“**Mastodon
   Autopost**“) and the customized message handles both the permalink and the parameters
   in the resulting toot as one full URL.
 *     ```wp-block-code
       [permalink]?mtm_campaign=TrackingMSTDN&mtm_kwd=DirectAMF&mtm_source=Mastodon
       ```
   
 * Is there a way to fix this?
   I tried to add more HMTL (a, /a) besides p, strong…
   But it seems it is sanitized when the settings are saved.
 * Sincerely
   DJM
 *  Thread Starter [cybeardjm](https://wordpress.org/support/users/didierjm/)
 * (@didierjm)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/shortcodes-empty-when-post-published/#post-16489277)
 * Thx for the latest update!
 * Sincerely
   DJM

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Shortcodes empty when post published’ is closed to new replies.

 * ![](https://ps.w.org/activitypub/assets/icon.svg?rev=3325036)
 * [ActivityPub](https://wordpress.org/plugins/activitypub/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/activitypub/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/activitypub/)
 * [Active Topics](https://wordpress.org/support/plugin/activitypub/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/activitypub/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/activitypub/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [cybeardjm](https://wordpress.org/support/users/didierjm/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/shortcodes-empty-when-post-published/#post-16489277)
 * Status: resolved