WordPress.org

Forums

Post Thumbnail Problem (4 posts)

  1. jimmy1234678
    Member
    Posted 3 years ago #

    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

  2. SpankMarvin
    Member
    Posted 3 years ago #

    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

  3. jimmy1234678
    Member
    Posted 3 years ago #

    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'?

  4. SpankMarvin
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.