AMC AMC - 3 months ago 8
PHP Question

php & wordpress - show full image instead of thumbnail?

I'm using this to show images on my wordpress blog-

functions:

add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 590, 275, true ); // 590 pixels wide by 275 pixels tall, hard crop mode


index:

<div class="post-wrap">
<?php the_post_thumbnail(); ?>
<?php the_excerpt(__('keep reading', 'grisaille')); ?></div>
<?php wp_link_pages(
array( 'before' => '<p class="pages-links">' . __('Pages:', 'grisaille'),
'after' => '</p>',
'next_or_number' => 'number',
'nextpagelink' => __('Next page', 'grisaille'),
'previouspagelink' => __('Previous page', 'grisaille'),
'pagelink' => '%')); ?>
<p class="postMeta"><small><?php _e('Category', 'grisaille'); ?> <?php the_category(', ') ?> | <?php _e('Tags', 'grisaille'); ?>: <?php the_tags(' '); ?></small></p>

<hr class="noCss" />
</li>

<?php comments_template(); // Get wp-comments.php template ?>

<?php endwhile; ?>


Instead of showing thumbnails, I'd like to show full images. How do I accomplish this?

Answer

Replace this:

 <?php the_post_thumbnail(); ?>

...with this:

 <?php the_post_thumbnail( 'full' ); ?>