Title: Implementing the Loop in archives.php
Last modified: August 19, 2016

---

# Implementing the Loop in archives.php

 *  [snthr](https://wordpress.org/support/users/snthr/)
 * (@snthr)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/implementing-the-loop-in-archivesphp/)
 * Hi…
 * I’m trying to solve a problem with my archives.php file for the Archives Page
   Template.
 * I’ve set up a page called ‘Our work’ to output the Archives on to, so it’ll sit
   at domain.com/our-work. The default file comes with wp_get_archives and wp_list_categories
   pre-cooked.
 * All working fine so far. However, I want to replace those tags, and output the
   archives via the Loop. However, when I use the Loop, it outputs a link to the‘
   Our work’ page itself. (Presumably because I’m on a page, not ‘in’ my posts… 
   or something like that).
    According to a couple of online tutorials, it should
   be possible to get the Loop working in archives.php. So… what am I doing wrong?
 * Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/implementing-the-loop-in-archivesphp/#post-1170078)
 * What exactly is it that you want to display on that page?
 *  Thread Starter [snthr](https://wordpress.org/support/users/snthr/)
 * (@snthr)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/implementing-the-loop-in-archivesphp/#post-1170286)
 * I want to display an extract from each post — title, date, beginning of post,
   tags, maybe some other details, etc.
 * wp_get_archives only allows a few limited variations on the `li`‘s-in-a-`ul` 
   way of doing things.
 * Basically, I want fancy archives, and the Loop should be fine for doing it, but
   it won’t work on this page. Anyone have any idea why?
 * Thanks.
 *  Thread Starter [snthr](https://wordpress.org/support/users/snthr/)
 * (@snthr)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/implementing-the-loop-in-archivesphp/#post-1170298)
 * Anyone?
 *  Thread Starter [snthr](https://wordpress.org/support/users/snthr/)
 * (@snthr)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/implementing-the-loop-in-archivesphp/#post-1170301)
 * Let me phrase this a different way.
 * If I have a page with my archives on it, listed post-by-post, and separate from
   the main blog listing (i.e. archives.php), how do I get extra information onto
   that page, along with the basic link to the post?
 * i.e., instead of having an archives page with just links, like this…
    - Hello World!
    - My second post
    - My third post
 * …I want them to be something like this, instead:
    - Hello World! (Comments: 2; filed under Chit-chat; tags: Hello, world; Extract:‘
      blah blah’)
    - My second post (Comments: 1; filed under Philosophy; tags: Thoughts; Extract:‘
      blah blah’)
    - My third post (Comments: 3; filed under Pets; tags: puppy, photo; Extract:‘
      blah blah’)
 * I had thought that the obvious way to do this was to get rid of wp_get_archives,
   and instead use the loop to output and display the information how I wanted it.
   However, the loop isn’t outputting links to my posts. Instead, it’s outputting
   a single link — to the archives page itself.
 * Any ideas?
 * Thanks.
 *  Thread Starter [snthr](https://wordpress.org/support/users/snthr/)
 * (@snthr)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/implementing-the-loop-in-archivesphp/#post-1170303)
 * Should I post the actual code from archives.php? Or some other info? Anyone got
   any ideas on this? Let me know, people…
 * Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Implementing the Loop in archives.php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [snthr](https://wordpress.org/support/users/snthr/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/implementing-the-loop-in-archivesphp/#post-1170303)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
