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?

  • 2
    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, 2013 at 21:24

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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