WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Multiple og:image Tags? (3 posts)

  1. Frederic Pilon
    Member
    Posted 1 year ago #

    I bumped into a bug this morning.

    When I have an article with a featured image + another image in the content, I have two og:image tags in my header, resulting in Facebook proposing 2 images to my users when they share said page.

    This wouldn't pose problem if it wasn't for the fact that between both images, Facebook takes the 2nd one, the one that is in the article and isn't the featured image.

    So is there a way to give priority to the featured image and/or to limit Yoast SEO to the featured image for it's og:image tags?

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

  2. Thomas Maier
    Member
    Posted 9 months ago #

    you can disable using images from the content by WordPress SEO with the following lines in your functions.php:

    add_filter('wpseo_pre_analysis_post_content', 'mysite_opengraph_content');
    function mysite_opengraph_content($val) {
        return '';
    }
  3. Girovago
    Member
    Posted 9 months ago #

    @Thomas
    Thanks for your message.

    There's a way for use the title of WP instead the tag title when i share a post on Facebook?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic