0

Firstly, I'm not a developer, mostly a website designer and CSS hacker.

I'll try to explain better:

I'm using a grid theme that creates a thumbnail out of the featured image to display as a post teaser. My previous theme would do the same, but would use the custom thumbnail that I created in the Thumbnail Setttings in the Media Library.

I imagine this is a simple change, maybe in the functions.php file?

I looked in the existing posts, but could not find a suitable answer. Feel free to link me to an existing thread discussing this.

  • Do you mean you want to display the Thumbnail size that you set in Settings -> Media Settings? – Ahmad M Feb 5 '13 at 21:27
  • Can you locate the piece of code responsible for "creating a thumbnail out of the featured image" ? This is possible using Firebug and searching inside the theme files. – brasofilo Feb 5 '13 at 21:28
  • @Ahmad M, In essence yes, I would set the thumbnail size to match my theme's grid pattern, then ensure any thumbnails I crop are either made to that size, or at least at that ratio. – Matt Lorenzi Feb 6 '13 at 0:13
0

If your theme is using the_post_thumbnail() to display the featured image, adding the following code in functions.php file will display the Thumbnail size of the image (as set on Settings -> Media Settings):

add_filter('post_thumbnail_size', 'my_thumbnail_size');
function my_thumbnail_size() {
    return 'thumbnail';
}

Or you can display the featured image in any width (X) or height (Y) you wish:

add_filter('post_thumbnail_size', 'my_thumbnail_size');
function my_thumbnail_size() {
    return array(X,Y);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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