Specify Full Sized Featured Image & Not 150×150 Thumbnail?
-
Hi guys,
I’ve got two query_posts set up outside of my loop that display thumbnail images. This is the first time I’m using the thumbnail feature and have got something wrong.
I thought I had specified the correct code, but instead of showing the resized image I uploaded (e.g. /wp-content/uploads/2010/11/filename.jpg), it instead outputs the 150×150 thumbnail (e.g. /wp-content/uploads/2010/11/filename-150×150.jpg)
Here is the code I am using for the first query:
<?php query_posts('cat=1&showposts=4'); ?> <?php while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink() ?>" title="Read <?php the_title(); ?>"> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { the_post_thumbnail(array( 130,48 ), array('class' => 'framed', 'width' => '130', 'height' => '48')); } else echo '<img src="' . get_bloginfo('template_directory') . '/images/thumb_4xlt.jpg" class="framed" height="48" width="130" />'; ?> <?php the_title(); ?><span class="subtext"><?php the_time('D F d Y') ?></span></a> </li> <?php endwhile;?>
And the second:
<?php query_posts('tag=featured&showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <a href="<?php the_permalink() ?>" title="Read <?php the_title(); ?>"> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { the_post_thumbnail(array( 330,126 ), array('class' => 'framed', 'width' => '330', 'height' => '126')); } else echo '<img src="' . get_bloginfo('template_directory') . '/images/thumb_4xlt.jpg" class="framed" height="126" width="330" />'; ?> <p><?php the_title(); ?><span class="subtext"><?php the_time('D F d Y')?></span></p></a> <?php endwhile;?>
Oddly enough, this code is a dang near duplicate of what I use in the Loop, and it displays the correct image. I’m not sure what I’m going wrong here, and I could really use your expert eyes giving this a look!
- The topic ‘Specify Full Sized Featured Image & Not 150×150 Thumbnail?’ is closed to new replies.