Forums

Thumbnail Size not acceptem form Wp (2 posts)

  1. nightstalker101
    Member
    Posted 1 year ago #

    Hi,

    i want thumbnails 150 by 100px, so I set it up in Media (/wp-admin/options-media.php). I checked the Box "Crop thumbnail to exact dimensions" went to a post and created a thumb for that post.

    But:
    The thumb has dimensions 100 by 100 instead of the set 100x150. I am using a custom theme and implented the thumbnail function with this code:

    add_theme_support( 'post-thumbnails' );

    Did anybody have a similiar problem or can recommend a solution?

  2. Michael Fields
    Theme Wrangler
    Posted 1 year ago #

    Which image size is specified in the_post_thumbnail()? Usually this will not be the size set in options -> media, but the size that your theme specifies via set_post_thumbnail_size().

    I would suggest that you track down all calls to the_post_thumbnail() in you theme and change the second parameter to 'thumbnail'.

    Something like this should work:

    get_the_post_thumbnail( null, 'thumbnail' )

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.