• The company I work for has recently been using the WordPress SEO plugin on most of our sites and it works pretty great. However, one obstacle we’ve encountered is that the Meta Description box does not allow Shortcodes to be used there (due to the “wpseo_strip_shortcode” regex function the plugin has in place) which we need on all of our sites.

    Perhaps this is an option that could be implemented in the plugin? For example giving plugin users the ability to toggle Shortcode ability on or off? Maybe let users choose between what type of filtered results the function returns? maybe offer to make it selectable from the “Titles and Metas” Plugin Admin Page?

    I suppose this is more of a “Feature Request” the Plugin Author could eventually consider. Sound like a useful feature to anyone else?

    Thanks

    http://wordpress.org/plugins/wordpress-seo/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I recently saw a simular request from someone else and as it’s the meta description we’re trying to fill, this would definitely *not* be a good idea.
    Most shortcodes return html, html can not be used in meta description tags, so this would present all sorts of new problems. Imagine someone unwittingly adding an image gallery to the meta description and breaking their whole site.

    What you could consider doing however, is adding a shortcode with a different delimiter and filtering the meta description for your shortcode using the filters provided.

    Hope this helps.

    Thread Starter James

    (@jamestl2)

    Yeah, our shortcodes we want to use only return text, no HTML involved there, so I can understand disabling them as such.

    I’ll look into your suggestion and see what we can come up with, thanks.

    You’re welcome. Hope it’ll work for you.

    For me it is the other way around: How can I get rid of shortcodes in the meta description?

    They are removed automatically for the front-end of the website. In the next version, they should also be automatically be removed in the snippet preview.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Meta Descriptions and Shortcodes’ is closed to new replies.