Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter slz

    (@slz)

    To anyone else that’s wanting to run shortcodes in the meta description, here’s how you can do it with WordPress SEO.

    Add this to your theme:

    add_filter(‘wpseo_metadesc’, run_short_codes_in_meta_desc, 1337);

    function run_short_codes_in_meta_desc($metadesc)
    {
    return do_shortcode($metadesc);
    }

    Thanks for this great solution, didn’t work for me at first but did once I reduced the priority level from 1337 to 100

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Feature Request: Apply shortcodes in meta description’ is closed to new replies.