WordPress.org

Ready to get started?Download WordPress

Forums

the_post_thumbnail( ) in proportion? (3 posts)

  1. sepp88
    Member
    Posted 3 years ago #

    hey guys,
    i want to use the_post_thumbnail( array(290,290) ); for my personal wordpress theme. however, i wonder how i have to use that function to set an image based on its with proportianally.

    so the image should always be 290px wide and the height should be proportional.

    the way the function works now is, that the image is always proportional but if the image is e.g. 290 high it gets not scaled to 290px in width. however it should ALWAYS be 290px wide and just its height should be adjusted proportionally.

    is that even possible? thank you for your help!

  2. Joseph
    Member
    Posted 3 years ago #

    Set height to something large that it'd never reach like 9999.

  3. sepp88
    Member
    Posted 3 years ago #

    ok, thank you, good idea though.

Topic Closed

This topic has been closed to new replies.

About this Topic