• Resolved cheonmu

    (@cheonmu)


    hello.

    I’m inserting product descriptions in Woocommerce using shortcodes.

    But when I check it in the source view, it recognises the shortcode as it is, like ‘ [block=”111″]’.

    Is there any way to change it to recognise the content inside the shortcode?

    Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @cheonmu,

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

    If you’re using any shortcode on the meta description, please use the following filter on your website:

    add_filter( 'rank_math/paper/auto_generated_description/apply_shortcode', '__return_true' );

    Here’s how you can add filter/hook to your WordPress site:?https://rankmath.com/kb/wordpress-hooks-actions-filters/

    However, please note that this filter only works for the autogenerated title & description. It will not work if you directly add a shortcode in the snippet editor.

    If you want to to get the shortcodes inside the snippet editor, the only viable option would be to create a variable that would parse the same value of the shortcode by editing the following filter:?https://rankmath.com/kb/filters-hooks-api-developer/#add-extra-variables

    Hope that helps and please don’t hesitate to let us know if you have any other questions.

    Thank you.

Viewing 1 replies (of 1 total)
  • The topic ‘Is there a way to make the meta description recognise shortcodes?’ is closed to new replies.