You are here: Computer Video TutorialThesis TutorialThesis Theme Thumbnails — WordPress Tutorial

Thesis Theme Thumbnails — WordPress Tutorial

by Kimi on November 20, 2010

How to display Thesis theme thumbnails — Set featured image WordPress 3 tutorial.

I noticed a few days ago, while trying to apply some modification of Thesis theme in wordpress local server, the featured image function is not yet built in Thesis 1.8 theme.

If you are using Twenty Ten theme or other wordpress 3 themes, it is not difficult to get “set featured” image for your post.

In Thesis theme, the process is a bit more complicated than in Twenty Ten theme, because it has hooks, which in fact more handy for modifying theme, because you have specific file to play around, which in this case, adding thesis theme thumbnails.


If you are using Twenty Ten and another theme, follow this wordpress featured image tutorial.

Before we continue, first check in your dashboard, if you have “set featured image” link exists in your dashboard.

thesis theme thumbnails

Do you have this link in your dashboard?

If not, you can follow this tutorial.

End result of the tutorial screenshot:

thesis theme thumbnails

End result.

blog seo

Where do you have to edit file in order to display Thesis theme thumbnails?

For Thesis theme users, you should know, there are two files which you can use to add thesis theme thumbnails. Those files are custom.css file, and custom_functions.php.

The most important file is custom_functions.php. This file is needed in order to activate the wordpress 3 functions to show thesis theme thumbnails.

How to add Thesis theme thumbnails step by step tutorial.

1. Backup your current custom_functions.php file. You can copy all the content to notepad, or copy and then rename the original to be custom_functions_orig.php or something like that.

2. Go to your dashboard, “Thesis” drop down menu, and “custom file editor”.

thesis theme thumbnails

3. Select “custom_functions.php”.

Custom Functions in Pull Down Menu.

Right in the buttom of this file, add this code: (see image).


// This theme uses post thumbnails
add_theme_support( 'post-thumbnails' );
//thesis thumbnails
function thumbnailset() {
if (is_home()) { ?>
<?php the_post_thumbnail();?>
<?php }
}
add_action('thesis_hook_before_post', 'thumbnailset');

I use if(is_home()) because i want to display only in homepage only.

Click “big a$$ save button”.

4. Refresh your page and you should see your thumbnails in homepage.

We’re almost done, but we should specify the width and height, and adding some style. You can modify the css style as you want, but this is what i use for this tutorial:

5. Still in Thesis custom file editor, now switch to “custom.css” file.

Add this code:

.attachment-post-thumbnail{padding:1.1em;background:#eee;width:200px;height:200px;
float:left;margin:10px 15px 10px 0;}

The result will be like in the result image above. One thing to note, be consequence with the dimension of your image, like in my other set featured image wordpress tutorial, if you use 200x200px images, you have to use this size always, otherwise it will make your blog loads slower.

I hope this Thesis theme thumbnails tutorial is useful for some of you.

Subscribe new tips via Email:

Was the post helpful? Share it to help others with:

{ 12 comments… read them below or add one }

Mohd Isa February 15, 2011 at 5:12 pm

i has try it on my blog, but thumbnails image not come out. why ya?

Reply

Kimi February 16, 2011 at 8:16 am

I have checked your blog, and it shows? I think it is fixed..

Reply

Mohd Isa February 16, 2011 at 8:25 am

yes, my friend has help me to fix it. anyway, i want ask u. how to make widget at footer like u?

Reply

Kimi February 17, 2011 at 6:01 pm

I might make a tutorial someday..

Mohd Isa February 19, 2011 at 2:24 pm

Thanks Kimi, I hope you can help me. Thanks again.

Reply

Alex March 13, 2011 at 10:07 pm

Hello,
It seems that none of my thumbnails or post images (i.e. images attached to the field ‘thesis_post_image’) seem to be displayed anymore, even after trying your tutorial. Any ideas?
Thanks in advance.

Reply

Kimi March 14, 2011 at 7:47 am

Hi Alex, no idea unfortunately,

Please visit diythemes forum.

Thanks.

Reply

bob April 5, 2011 at 12:46 pm

hello,

thanks for your tutorial.
What if you want to have it on categories too, not just homepage?

Thanks…

Reply

Kimi April 5, 2011 at 9:18 pm

Hi Bob,

Thesis has its own forum, please ask there.

I only provide videos that are available here.

Kind regards,

Kimi.

Reply

Maude Fernandez May 22, 2011 at 3:52 am

Thanks! It worked for me, right out of the box. I was trying another tutorial from another site, but the errors were all over.

Reply

serge July 23, 2011 at 12:14 am

Hi, nice code over here. For those who are looking something really “lazy” (just as me) way to use wordpress featured image under thesis – you guys may check this plugin of mine WP Featured image for Thesis Theme

cheers,
serge

Reply

Manendra July 23, 2011 at 6:05 pm

This is not working for me when i save that file in custom.php it is showing me error report. Ho to fix this ?

Reply

Know better? Feedbacks, or Questions? Shoot! :-)

Please use a name instead of blog name or SEO stuff, otherwise it will be deleted right away.

About checkbox → See more my post:how to get rid of spam bots in wordpress post.

Thank you for visiting, you're always welcomed to be here again!

Previous post:

Next post: