Title: Second loop excerpt question&#8230;&#8230;&#8230;
Last modified: August 19, 2016

---

# Second loop excerpt question………

 *  [ben29twelve](https://wordpress.org/support/users/ben29twelve/)
 * (@ben29twelve)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/second-loop-excerpt-question/)
 * First off the code:
 *     ```
       <?php query_posts('showposts=5'); ?>
       <?php $posts = get_posts('numberposts=5&offset=1');
       foreach ($posts as $post) : start_wp(); ?>
       <?php echo "<a href='",the_permalink(),"'>",get_the_excerpt($fakeit = false),"</a>"; ?>
       <?php endforeach; ?>
       ```
   
 * I’ve got a photoblog at [http://www.29twelve.com](http://www.29twelve.com/blog/)
   which simply shows a photo (post) at a time, it’s all very simple. I use Custom
   query string to show 1 post on the home page with subsequent pages also showing
   1 photo.
 * I want add the previous 5 thumbnails (excerpts) underneath my current photo using
   a second loop, the code I’ve written is above. This works fine in index.php but
   I also use single.php and the code doesn’t work in this page as it still shows
   the last 5 thumbnails relating the my latest photo and not the one that’s displayed
   on the page.
 * I think I must be able to add a simple count but my php is sufficiently limited
   that I’m not sure where to start. Any ideas??
 * Thanks in advance.

Viewing 1 replies (of 1 total)

 *  [Alex Cragg](https://wordpress.org/support/users/epicalex/)
 * (@epicalex)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/second-loop-excerpt-question/#post-718226)
 * Have you read this page?
    [http://codex.wordpress.org/Template_Tags/get_posts](http://codex.wordpress.org/Template_Tags/get_posts)
 * That seems to provide the answers, but I haven’t tried it myself,
    let me know
   if that works.

Viewing 1 replies (of 1 total)

The topic ‘Second loop excerpt question………’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 2 participants
 * Last reply from: [Alex Cragg](https://wordpress.org/support/users/epicalex/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/second-loop-excerpt-question/#post-718226)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
