meta og:image for post
hey!
i want to set a facebook meta og:image tag in the header adequate to each post.
What function shall I call in this tag to make it happen?
The meta tag in which I want to exchange XXX with a URL to featured image:
<meta property="og:image" content="<?php XXX ?>" />
Thanks in advance!
i want to set a facebook meta og:image tag in the header adequate to each post.
What function shall I call in this tag to make it happen?
The meta tag in which I want to exchange XXX with a URL to featured image:
<meta property="og:image" content="<?php XXX ?>" />
Thanks in advance!
Comments
you can try to use WP Facebook Open Graph plugin. However, if this plugin won't be helpful, we do not have other
I just want to known what's the function name which calls the URL of featured photo in single post.
"mfn_post_thumbnail( get_the_ID() );" calls whole div with the URL and I want to know which function calls pure URL to the thumbnail/featured photo...
<meta property="og:image" content="<?php $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $postID ), 'large' ); echo $large_image_url[0]; ?>" />
and it looks like a working one
We are glad to hear that your solution works.
Hi in my case plugin Shareaholic make the work !!!