WordPress.org

Support

Support » How-To and Troubleshooting » featured image thumbnails

featured image thumbnails

  • Aron 15
    Member

    @aronevans

    Hi everyone,

    I’m trying to use this code to display the featured images of each post within a category…

    <?php while (have_posts()) : the_post(); ?>    
    
    		<?php if (has_post_thumbnail( $post->ID ) ): ?>
        		<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
    		<li><img onload="fadeIn(this)" class="image" src="<?php echo $image[0]; ?>"></li>
    		<?php endif; ?>
    
                   <?php endwhile; ?>

    Is it possible for this code to show the ‘large’ version of the image – I have tried everything but can’t seem to be able to get it to work..

    Maybe I am missing something?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘featured image thumbnails’ is closed to new replies.