I like to do things manually on my blogs and use as little plugins i can. If i can use a plugin for two things it’s great. A good example is Auto feature Image plugin i am using for display on the front page of my blog, rss thumbnail and Facebook thumbnail (details here).
Here is how you can use your seo plugin, whatever it is, to set an og:descrption, for better looking posts on Facebook timeline. So, look for meta name=”description” in your plugin and add property="og:description" after it.
In Yoast SEO plugin it’s easy:
echo ‘<meta name="description" content="’.esc_attr( strip_tags( stripslashes( $metadesc ) ) ).’"/>’."\n";
echo ‘<meta name="description" property="og:description" content="’.esc_attr( strip_tags( stripslashes( $metadesc ) ) ).’"/>’."\n";
The result is this: my post has a short description, the other one does not.
Leave a Reply