WordPress.org

Support

Support » Themes and Templates » [Resolved] Stretch thumbnail to exact dimensions

[Resolved] Stretch thumbnail to exact dimensions

  • erikhgm
    Member

    @erikhgm

    Is there a way to make the post thumbnail function to stretch the thumbnail to exact dimensions both width and height?

    <?php the_post_thumbnail(array(198,120,true)); ?>
    <?php the_post_thumbnail(array(‘my-custom-size’); ?>

    I have tried these ways but both stops resizing the thumbnail when either one of the measures are fulfilled.

    How can I add a css class to a section of thumbnails and use css instead?

    Thanks
    Erik

Viewing 2 replies - 1 through 2 (of 2 total)
  • Jorge
    Member

    @jas956

    Why not use the Media Settings in the Dashboard and specify on your (Parent or Child) theme thumbnail, medium or large?

    erikhgm
    Member

    @erikhgm

    Well that would also stop resizing the thumbnail when either one of the width or height measure are fulfilled.

    However i solved it by adding a css class to the post thumbnail a href tag and resize with css.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Stretch thumbnail to exact dimensions’ is closed to new replies.