• Resolved tlw22

    (@tlw22)


    Hi there,

    Does anyone know how to enlarge the image thumbnail size for just the latest post? I’m currently using the default 2010 theme (modified). I’ve named any latest posts as: .firstpost and the thumbnail div is: post_thumbnail. So my question is how can i connect the two divs so I can change the size of post_thumbnail but for just .firstpost.

    Hopefully this makes sense

    Thanks in advance

    Link: https://apps.thatrule.com

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter tlw22

    (@tlw22)

    Ok, great thanks! I’ll go give it a go! ??

    Thread Starter tlw22

    (@tlw22)

    I just updated the image however it is still remaining small and not stretching out within the border. Any ideas?

    I am not at home or a development PC at the moment, have a look at the twenty ten header, this gets and loads the image by url then you could style the image rather than a div.

    I am using this in a theme I am working on, but do not have access to the code atm.

    David

    Thread Starter tlw22

    (@tlw22)

    Thanks, I’ll go have a go. Thanks again for all your help

    Thread Starter tlw22

    (@tlw22)

    haha! Just changed the div when I was styling it to: post-latest img{ and it works perfectly now. Cheers

    I would still try the float:left then the text should wrap rather than going to the line below.

    Also it would be nice to post a code snippit of the solution so others may benefit from it.

    David

    Thread Starter tlw22

    (@tlw22)

    Yep I’m just about to make it flow smoothly now ??

    Here is the solution code:

    <?php if(!$fisrtimage) : ?>
       <?php $fisrtimage=true; ?>
       <?php if ( has_post_thumbnail()) : ?>
          <div class="post-latest" <?php echo $imgstyle; ?>>
             <?php the_post_thumbnail('first-post'); ?>
          </div>
       <?php endif; ?>
    <?php else: ?>
       <?php if ( has_post_thumbnail()) : ?>
          <div class="post-image" style="" >
              <?php the_post_thumbnail('list-post'); ?>
          </div>
       <?php endif; ?>
    <?php endif; ?>

    Then style the divs in a css file. If you want to style the images be sure to add img{ at the end of the div. E.g .post-latest img{}

    Cheers

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Enlarge Thumbnail Size?’ is closed to new replies.