If you’re involved with social media sites like Digg, Facebbok or Reddit, you’ve probably seen stories with images next to them. If you’ve submitted stories there, you may have seen it present you with a few image choices, sometimes the one you want is there sometimes it isn’t. Then there’s the the case where the social media site chooses the image on it’s own, and it’s a crappy image or worse yet an ad … dooming your story to failure. Did you know there’s a way to fix that problem?
Many social media sites like Digg and Facebook work with what’s called the facebook share standard, so you can tell these services which image you’d prefer they use. This tutorial deals specifically with Thesis, but again can be used on any wordpress blog, but remeber things are just easier with thesis
We need to open up custom_functions.php and add the following code:
// facebook connect digg social media image
function get_social_img() {
global $post;
if ( is_single ()){
$image = "";
$image = get_post_meta($post->ID, 'thesis_post_image', $single = true);
?>
<link rel="image_src" href="<?php echo $image; ?>" />
<?
}
}
The code is pretty small and easy so I’ll walk you through it.
- We create a new function named –
get_social_img global $post;let’s us get all the dataif ( is_single ())says only execute this code on a single post- we then get the
thesis_post_imagefor this post - and write it to the HTML code.
Now we have to tell thesis where and when to execute the function, we do that by adding this to custom_functions.php
add_action('wp_head', 'get_social_img');
You may not have seen wp_head before, it’s a built in wordpress shortcode that tells it to execute this code in the head area of the page. That’s it easy as pie. You could improve the code, by maybe adding an if/then to chose the thumbnail over the big picture, or maybe see if there is a special field and then fail over to thumbnail or main image. I think this funtionality should be added to the next version of thesis, if you agree let them know (wink wink nudge nudge). if you enjoyed this post check out some of my other thesis tutorials.

Related posts:
- Content Syndication: How to Make it Work for You Syndicating your content is a tricky game. On the one...
- How to Make YouTube work for Your Company So say you’re a traditional SEO consultant and your looking...
- Your Facebook Fan Page – 5 Ways to Make the Most of It If your business targets consumers, do you already have a...
- How to Make Your Address Book More Useful with Facebook While there are a lot of advantages to having a...
- How to Add a Carousel to Your Thesis Blog If you’ve spent any time visiting blogs lately chances are...
Advertisers:
- Text Link Ads - New customers can get $100 in free text links.
- BOTW.org - Get a premier listing in the internet's oldest directory.
- Ezilon.com Regional Directory - Check to see if your website is listed!
- Need an SEO Audit for your website, look at my SEO Consulting Services
- Directory Journal - Get permanent deep links in a search engine friendly directory
- TigerTech - Great Web Hosting service at a great price.
- Article-Writing-services.org - Article Writing Services creates quality content for websites and blogs at no cost to site owners.
- Link Building Services - Hire WeBuildLink.com for well-planned advanced link building campaigns. Very affordable. Contact us now for a FREE evaluation.
- Try HOTH Plus+ NOW - The First 1-Stop Link Building Solution Powered by 100% College Educated Copywriters!
- Professional website designs - Get a unique brand image with website designs that sets you apart and convert your visitors into customers. Make a brand, not just a website
See my disclaimer about advertising and affiliate links










