• 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)
  • What exactly is it that you want to display on that page?

    Thread Starter snthr

    (@snthr)

    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

    (@snthr)

    Anyone?

    Thread Starter snthr

    (@snthr)

    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

    (@snthr)

    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.