I changed
`
return $wp_query->queried_object->description;
`
to
`
$term_desc = $wp_query->queried_object->description;
$term_desc = do_shortcode($term_desc);
return $term_desc;
`
After that change, the front end preview is still showing the short codes.
Hello,
Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.
You can allow the addition of shortcodes to the meta description by adding the following snippet to your theme’s functions.php file:
/**
* Allow shortcodes in the Meta Data.
*/
add_filter( 'rank_math/paper/auto_generated_description/apply_shortcode', '__return_true' );
Looking forward to helping you. Thank you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.