WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Stretch thumbnail to exact dimensions (3 posts)

  1. erikhgm
    Member
    Posted 2 years ago #

    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

  2. Jorge
    Member
    Posted 2 years ago #

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

  3. erikhgm
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic