Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS WordPress – Featured Post Thumbnail help!

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32732
    clstainbrook
    Member

    My website is http://www.whyclothdiaper.com.
    Does anyone know how to make the featured post thumbnails on the main page be all the same size–yet not distort the image? With them being miscellaneous sizes, it’s causing the text underneath to cut off awkwardly. Any suggestions?

    #76212
    TheDoc
    Member

    Add this to functions.php:

    set_post_thumbnail_size( 50, 50, true );

    The important part here is the ‘true’ – it will crop the image to make sure it fits the specifications you’ve set.

    You could also do something like this:

    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 50, 50, true ); // Normal post thumbnails
    add_image_size( 'home-page', ##, ##, true ); // Home Page thumbnail size

    And then on your home page you call it like this:

    More info: http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/

    #76038
    clstainbrook
    Member

    Thank you! It worked!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.