WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Opengraph Meta Description (1 post)

  1. dentvii
    Member
    Posted 1 year ago #

    Guys / Yoast,

    I have set up meta description for each of my articles, yet when outputting the og:description, I am getting an exceptional lenghty paragraph, instead of my desired 140 chars.

    http://i.imgur.com/FJJXw.png

    I can't find any option on my social page to set my og:description as my meta of to limit the excerpt to 140, instead of the current limit of 300.

    http://i.imgur.com/9VdwG.png

    And I don't want to change your code so I won't have to edit every time you update, because your updates rocks.

    What can be done?

    /**
    	 * Output the OpenGraph description, specific OG description first, if not, grab the meta description.
    	 */
    	public function description() {
    		$ogdesc = wpseo_get_value('opengraph-description');
    
    		if ( !$ogdesc )
    			$ogdesc = $this->metadesc( false );
    
    		if ( $ogdesc && $ogdesc != '' )
    			echo "<meta property='og:description' content='".esc_attr( $ogdesc )."'/>\n";
    	}

    Thanks guys / Yoast!

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.