WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to display all the posts by the featured image of each post.

Is there a shortcode or can you give me some tips on how to achieve this ?


share|improve this question
What are you referring to? Something like a grid theme? – brasofilo Jun 14 '12 at 20:51
yes, something like this, I want to be able to display all my posts as thumbnails and when a user clicks on it to go directly to that specific post – Cristocea Costel Jun 14 '12 at 21:34

you can modify or create a simple posts loop with only feature image in there. so you could use something like :

<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

    <div class="feature-image">
        <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>

<?php endwhile; ?>
<?php wp_reset_query(); ?>

then your CSS can be:

.feature-image {

.feature-image a:link img {
    background: green;
    padding: 3px;

.feature-image a:hover img {

this should create a simple grid of feature images with a green border that will change to blue when you hover the image. obviously you can change the look of it by adding different styling but this should get you a good start point.

share|improve this answer
Thank you! Do you have any ideea how to modify the thumbnail size of the featured image ? – Cristocea Costel Jun 14 '12 at 23:04
That's both a separate question, and one that has been asked many times here on WPSE. Try searching the site for the answer. Hint: add_image_size() is your friend. – Chip Bennett Jun 14 '12 at 23:08
@CristoceaCostel or you can use parameters to change the default: the_post_thumbnail(array(100,80)) where 100 and 80 are width an height in pixels. – wdalhaj Oct 4 '12 at 16:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.