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'm trying to edit the loop in my archive.php template so that when I visit a category page, it only displays the post excerpt and uses the featured image as a thumbnail.

When I add the_excerpt() to the loop it displays the excerpt of the first post, but then just keeps repeating it indefinitely?

Here's the loop I'm trying to edit / modify:

// Start the Loop
while (have_posts())  {                 
    get_template_part('content', get_post_format());

// Display navigation to next/previous pages when applicable
if (theme_get_option('theme_bottom_posts_navigation')) {
share|improve this question
up vote 1 down vote accepted

the_post - Iterate the post index in The Loop. Retrieves the next post, sets up the post, sets the 'in the loop' property to true.

 while (have_posts())  { the_post();

after you trigger the_post your the_excerpt shold return different values.

share|improve this answer
Thank You for sorting that out for me Code Monkey – speedypancake Nov 17 '12 at 17:29

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.