How to Add Facebook Image Meta in Thesis

It’s nice when we write good content. It’s even better when a reader shares it on sites such as facebook or twitter. One problem with sharing on facebook is that facebook will try to pull in images from the site but may not always pull in the one you want. You can control what images show up with a special meta tag. This will make the one you pick as the first image, but unfortunately not the only image. This is still useful if you post only a youtube video in your post or page and want to specify an image for when shared on facebook. Facebook has a set of share tags available.

To specify an image I first upload it using the Media->Add New wordpress page and grab the URL of the image after I upload it. Next, while on the page or post scroll down to the Custom Fields area. The first time you will need to add a new field. Call it image_src and to the right paste in the full path to the image you just uploaded. Save the post. Next, add the code below one time to your Thesis theme’s custom_functions.php file.

Here is the link to the text file with the Thesis code to add to custom_functions.php.

That’s it! Pretty simple huh? Leave a comment if you have any questions or comments. Thanks for reading!

This entry was written by and posted on Tuesday, June 29th, 2010 and is filed under WordPress.
Tagged as: facebook thesis
Follow any responses to this entry through the RSS 2.0 feed.

7 thoughts on “How to Add Facebook Image Meta in Thesis


Did you add the meta tag in when you added the post? You have to do this for each post that you want to specify the image to use when people share your content.

I’m having the same problem; it certainly seems like one of these solutions will work, but they are not. Interestingly, when I look at the source code for the post in question, I see that that there is not fb_meta tag added into the head. Perhaps I have to create a NEW post for this to act on it, and it won’t do this for the ones I’ve already created?

I tried adding a new test post and looked at the source, and unfortunately, the link rel= I’m hoping to see is still not there. The php is not adding it. Then I tried moving the new php to the top of the custom_functions.php and that didn’t help, either.

Back to the drawing board, I guess, unless someone here has a solution. The site is, and the post in question is the new pukka herbs teas off the front page.

Comments are closed.