Thumbnail Sizes (2 posts)

  1. kyle110
    Posted 3 years ago #


    I have setup a wordpress blog using a theme which supports featured image.

    When the posts are listed the thumbnail is the correct size. Nevertheless when I go to view the posts as a single post the thumbnail stays small - but I want it to display the full width of the post - how would I do this?

    I had a look at function.php and made a new add image size:

    add_image_size( 'single_post', 640, 200, true );

    And I changed get the post thumbnail in single.php to:

    $image_url = get_the_post_thumbnail($post->ID, 'single_post', array('class' => 'postThumb', 'title' => the_title_attribute('echo=0')));

    But its still not making the thumbnail go full width when viewing a single post.

    Could anyone point me in the right direction?


  2. Amy Hendrix (sabreuse)

    Posted 3 years ago #

    Thumbnails are generated at the time the image is uploaded - so the images you already had in place wouldn't have been resized for your new image size. The Regenerate Thumbnails plugin will take care of this for you.

Topic Closed

This topic has been closed to new replies.

About this Topic