Support » Themes and Templates » Post Thumbnail Problem

  • jimmy1234678

    (@jimmy1234678)


    I’ve been trying to work out all day how to change my post thumbnail image size + alter the post excerpt position. I have been experimenting with the first post on this page as you can see below.

    http://lifeandmind.net/articles/

    I have inserted the image through edit post>featured image. But I would like to have the thumbnail image larger, plus the excerpt below the thumbnail.

    I have tried altering the thumbnail size through setting>media. But this did not work. I can’t stop the two from overlapping either, have tried various ‘float bottom/top’ and padding but I can’t get it to work.

    So ideally I would like a larger thumbnail image for each post, with the post excerpt below.

    Any help would be great!

    Thanks, James

Viewing 3 replies - 1 through 3 (of 3 total)
  • SpankMarvin

    (@spankmarvin)

    In your theme, you an either assign a size manually to the_post_thumbnail by replacing ‘thumbnail’ with an array of integers (width, height).

    The better method is to register a new size in your functions.php file, which uses add_image_size();

    http://codex.wordpress.org/Function_Reference/add_image_size

    Then replace ‘thumbnail’ with ‘newsizename’. You will, however, need to regenerate your images. See this plugin for easy thumbnail regeneration.

    John

    jimmy1234678

    (@jimmy1234678)

    Okay so I place this in functions.php <?php add_image_size( $name, $width, $height, $crop ); ?>

    Then edit it to this for example

    <?php add_image_size( ‘newimagesize’ , 250, 250, true ); ?>

    Is this correct? What should I do next? Where do I replace ‘thumbnail’ with ‘newimagesize’?

    SpankMarvin

    (@spankmarvin)

    Wherever in your theme your thumbnail is appearing, it ought to be using the_post_thumbnail() function. That is where you should replace the image size. Remember you will need to regenerate your thumbnails for existing (already uploaded) images to work with your newly defined image size.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Post Thumbnail Problem’ is closed to new replies.