Grow your CSS skills. Land your dream job.

WP – more than one thumbnail size?

  • # January 18, 2011 at 6:50 pm

    Hi all, just curious if anyone has done this. I’m having a hard time locating any articles or resources saying if you can make an image associated to a post two different sizes based on where you are looking dynamically.

    As an example, the homepage would have a really large post image size as a feature. Then we would have an archive that would show the same image, but instead of being like 400×400, it would be 100×100.

    # January 18, 2011 at 6:57 pm

    try this

    	set_post_thumbnail_size( 50, 50 );

    the 50, 50 sets the size of the thumbnail if this is the post thumbnail

    # January 19, 2011 at 11:35 am

    Would that be something you added within the loop that overrides the size that’s set in the functions.php? I guess I’m wondering if it would be better to just apply this to each loop individually instead of applying it globally and then trying to override it (if that makes any sense?)

    # January 19, 2011 at 11:36 am

    Yeah, you would apply this in the loop. It does override any globally set preferences.

    # January 19, 2011 at 1:30 pm

    Awesome info man. I really appreciate the help!

    # January 19, 2011 at 1:59 pm

    Anytime.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".