WordPress.org

Support

Support » Plugins and Hacks » Yoast SEO » Image caption in meta description

Image caption in meta description

Viewing 2 replies - 1 through 2 (of 2 total)
  • I would also like to know how this can be avoided.

    It’s possible to override the description text template on a per-page basis using the Yoast Meta Box on the page/post editor screen.

    However if the plugin could be smart enough to disregard any text in captions all together that’d be great.

    I’m not use Yoast but I had to do something similar with the Zoom Framework SEO settings.

    It boiled down to using something like this in the function where the meta descrption is being create:

    // remove [caption] shortcode
    $content = preg_replace("/\[caption.*\[\/caption\]/", '', $post->post_content);

    Various other processing is then done to $content before being output in the meta description tag.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image caption in meta description’ is closed to new replies.
Skip to toolbar