WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a loop where all the posts have their own like button, when i click it the facebook window appears but it does not show the right post thumbnail. I think this is normal because in a posts loop the thumbnails are multiple so the script can not figure which one goes where - on the contrary the like button works perfectly on my single post pages.

So my question: is it possible to have the facebook like button work correctly on a loop page so that it grabs the right post thumbnail even if there are, say 10 posts in that page?

Maybe i should have multiple Open Graph metas, a set for each post in the loop, but i guess this would just cause a mess, is there something that i can do?

share|improve this question
Had you researched if Facebook supports this in first place? Details on what they allow and how would be pre-requisite for implementing it in WordPress. – Rarst May 28 '13 at 21:24
up vote 0 down vote accepted

As far as I know this is not possible the way you're trying to get it to work. You can specify an image for Facebook to use in the <meta> tag, but that's about it.

One thing you can try is use JavaScript to invoke the Facebook feed dialog. It has a picture parameter:

The URL of a picture attached to this post. The picture must be at least 50px by 50px (though minimum 200px by 200px is preferred) and have a maximum aspect ratio of 3:1

The Javascript Example section at the link above is pretty self-explanatory.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.