Hi guys! At the beginning I’d like to say – thanks for your great job! Templates are really cool, clean, intuitive and fresh. However, I’ve a problem with one of them – Minion. When sharing a link to a post on LinkedIn or Facebook a preview is generated. This preview uses data from my blog using Minion template. It should show picture and some text from my post. On LinkedIn it doesn’t show nothing, despite the link, and on Facebook it shows some text but without a picture. Of course it works perfect with other templates, but not with Minion. Is there any plugin or fix for this? Thanks in advance for any help!
To resolve this issue, you can open the functions.php file. add the following code at the bottom of the file.
add_action('wp_head', 'minion_features_image_as_og_image');
function minion_features_image_as_og_image() {
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium'); ?>
<meta property="og:image" content="<?php echo $thumb[0] ?>" />
<?php }
Thanks for an answer! Your code solved the problem for Facebook but not for LinkedIn. It seems that the problem is with LinkedIn, but not with the theme.
Have you tried adding
prefix="og: http://ogp.me/ns#"
to the HTML tag? More info here:http://ogp.me/
Ouch! I just did what Dominic was suggesting above and the whole site (front and back ends) just went blank! I cannot even login anymore in the WP admin…
can you help. this is very urgent!!! what do you suggest?
Hi Thierry,
That code above was added to DW Minion theme since version 1.0.5, so please update the theme to get it works.
Hope that helps!
Please login or Register to submit your answer