WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
OpenGraph meta data not showing (2 posts)

  1. aderojas
    Member
    Posted 2 years ago #

    Hi there,

    I just installed Yoast WordPress SEO plugin, hoping it would help me manage the OpenGraph meta data, but I'm still unable to make it work: when I share posts on Facebook, the "description" field just copies the "title", instead of taking the excerpt or my customized description... even though right now my pages source code shows the meta tags:

    <meta property='og:locale' content='es_ES'/>
    <meta property='og:title' content='my blogs whatever'/>
    <meta property='og:description' content='my blog's whatever'/>
    <meta property='og:url' content='my blog's whatever'/>
    <meta property='og:site_name' content='my blog's whatever'/>
    <meta property='og:type' content='article'/>
    <meta property='og:image' content='my blog's whatever'/>

    I'm not a pro developer, and I installed a free WP template over which I've worked to customize it. Since with other themes it works, I assume it has something to do with my new theme. Can anybody help me track this down?? My blog's URL: http://www.enquepiensauncalcetin.com

    Thanks a lot!

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

  2. aderojas
    Member
    Posted 2 years ago #

    So, I found that Jetpacks' Sharedaddy was adding another meta og:description to the header. I have gone to the plugin file "sharing-sources.php" and deleted this whole function:

    'public function display_header() {
    if ( $this->share_type == 'share' ) {
    // Set the open graph description, otherwise Facebook may pick up some random text from the page
    global $post;

    if ( $post && $post->ID > 0 )
    echo '<meta property="og:description" content="'.esc_attr( apply_filters( 'sharing_post_title', $post->post_title, $post->ID, $this->id ) ).'" />';
    }
    }'

    So the second meta og:description doesn't appear anymore, but apparently Facebook still gets the wrong description from somewhere. Any ideas?

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic