Description from shortcode

#355404
  • Resolved EnterCloud
    Rank Math free

    Hi Team,

    I use a plugin with some random content.

    To apply the content in my posts, I use a shortcode.

    But Rank Math doesn’t grab the content from the shortcode and the meta description is empty,

    Can you please advise me?

    Regards,
    Stathis

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.

    We intentionally stripe shortcodes from the metadata as many shortcodes print HTML, which breaks the front-end design.

    If you want to use shortcodes in the metadata, please try the below filter in your theme’s functions.php file or use the Code Snippets plugin.

    https://rankmath.com/kb/filters-hooks-api-developer/#allow-shortcodes

    /**
     * Allow shortcodes in the Meta Data.
     */
    add_filter( 'rank_math/paper/auto_generated_description/apply_shortcode', '__return_true' );

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Great, Thank you very much for your support!

    Azib Yaqoob
    Rank Math business

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    Thank you.

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

The ticket ‘Description from shortcode’ is closed to new replies.