Thumbnails on Facebook at Like Button
-
Hi, I am Spanish, so sorry for my English.
I have a problem with my blog. I have this code on my header.php:
<?php if(is_single()){ $values = get_post_custom_values(‘fbimage’,$post->ID) ;
if($values[0]!=”){?>
<meta property=”og:image” content=”https://www.vidalowcost.com/wp-content/uploads/<?php $values = get_post_custom_values(‘fbimage’,$post->ID); echo $values[0]; ?>”/>
<link rel=”image_src” href=”https://www.vidalowcost.com/wp-content/uploads/<?php $values = get_post_custom_values(‘fbimage’,$post->ID); echo $values[0]; ?>” / >
<?php }}
else{ ?> <link rel=”image_src” href=”https://www.vidalowcost.com/wp-content/themes/Elements/img/logo_face.png” />
<?php }
?>All work perfect when I use the sidebar buttons but I had put Twitter and Facebook like buttons in the single post and if yo click in the Facebook Like button, the thumbnail post or default doest apear, only one image of the comments.php
I think if I put this code like a funtion maybe works but I was trying and I cant convert this code in a funtion.
Can you help me? Thank you very much
- The topic ‘Thumbnails on Facebook at Like Button’ is closed to new replies.