Title: shortcode
Last modified: January 20, 2023

---

# shortcode

 *  Resolved [Aaron](https://wordpress.org/support/users/jstask/)
 * (@jstask)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/shortcode-934/)
 * The documentation states
 * > Slim SEO supports shortcodes in the meta title and meta description, you can
   > add your own shortcodes here to output your custom dynamic content.
 * However, if I do a short code inside my content like “Some[shy]superlongstring”
   and do not enter a manual meta, the shortcode won’t get executed inside the meta
   tag.
    -  This topic was modified 3 years, 4 months ago by [Aaron](https://wordpress.org/support/users/jstask/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fshortcode-934%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * (@rilwis)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/shortcode-934/#post-16429167)
 * Hi [@jstask](https://wordpress.org/support/users/jstask/) ,
 * A stupid question, but have you registered the shortcode?
 *  Thread Starter [Aaron](https://wordpress.org/support/users/jstask/)
 * (@jstask)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/shortcode-934/#post-16429194)
 * Hey,
 * Sure I did. Otherwise, the short code won’t get executed inside the Gutenberg
   editor. Your question make me think you missed the important thing: This only
   happens if I don’t enter a meta description myself, and keep using the default
   one. As soon as I enter something, the shortcode works as expected.
 *  Plugin Author [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * (@rilwis)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/shortcode-934/#post-16432653)
 * I got it. I recorded a video on this case:
 * [https://monosnap.com/file/khFS47zkyu7eLRXefdrA5mrlioRzhw](https://monosnap.com/file/khFS47zkyu7eLRXefdrA5mrlioRzhw)
 * Just a note that shortcodes are not rendered in the preview, but when viewing
   on the frontend, it’ll rendered correctly.
 *  Thread Starter [Aaron](https://wordpress.org/support/users/jstask/)
 * (@jstask)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/shortcode-934/#post-16434554)
 * Hey [@rilwis](https://wordpress.org/support/users/rilwis/),
 * I rechecked and noticed two things:
    1. My own block: No preview inside meta description, but output in the meta-tag
       without short shortcode execution.
    2. The Core Paragraph Block Works as expected
 * I guess it is because I use render callbacks: my block is storing its content
   inside the block attributes and the safe function is returning null. If this 
   approach is wrong when using render callbacks, I appreciate a hint 😉
 * Below are my block attributes in comparison to the core paragraph attributes
 *     ```wp-block-code
       <!-- wp:aaronkessler/text {"size":"5xl","margin":"xl","customMargin":true,"tag":"h1","content":"\u003cmark class=\u0022mark bg-white\u0022\u003e\u003cspan class=\u0022mark-span bg-gradient-to-r from-primary-700 via-primary-500 to-primary-700 text-transparent bg-clip-text\u0022\u003eWebdesign\u003c/span\u003e\u003c/mark\u003e und Medien[shy]gestaltung","gradient":"Primary-Gradient","font":"Display","className":"mark-first-word","anchor":"heading"} /-->
   
       <!-- wp:paragraph -->
       <p>Medien[shy]gestaltung</p>
       <!-- /wp:paragraph -->
       ```
   
 * I guess for the preview it is impossible to get it to work, because AFAIK there
   is no standard for block attribute names.
 * But since it is outputting the content without the shortcode execution inside
   the meta-tag, I guess there must be a way to fix it.
 *  Thread Starter [Aaron](https://wordpress.org/support/users/jstask/)
 * (@jstask)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/shortcode-934/#post-16451190)
 * Well, I rethought it and I do return something in my save component now that 
   can be parsed.

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

The topic ‘shortcode’ is closed to new replies.

 * ![](https://ps.w.org/slim-seo/assets/icon.svg?rev=2005049)
 * [Slim SEO - A Fast & Automated SEO Plugin For WordPress](https://wordpress.org/plugins/slim-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/slim-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/slim-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/slim-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/slim-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/slim-seo/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Aaron](https://wordpress.org/support/users/jstask/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/shortcode-934/#post-16451190)
 * Status: resolved