Archives Page Tip

I’m finally fixing all the bugs on photomatt.net, converting a lot of old stuff into WordPress Pages and generally tidying a few things. For my archives I wanted to display a list of recent entry titles like Hemingway does, but I ran into the problem that it would only show 10 at a time (or whatever you have set in your options) and then makes you page through the rest, which sucks. But, thanks to WP, the fix is easy! I added query_posts($query_string . '&showposts=1000&order=asc'); to the archive.php template right under the header call. Basically what this says is to take the current page query and add the part that shows a bunch of posts, in this case 1000, and also to sort it chronologically instead of newest to oldest. (Eric would be happy.) Since it’s in my archive template it doesn’t mess with any other pages. That’s all!

7 thoughts on “Archives Page Tip

  1. Is there any way to show artchives for two or more caterogies on the same page? For example if you had “hardware” and “software” and you wanted a combined archive page how would you do that?

  2. This is very cool, Matt.

    While you are futzing with photomatt, consider adding a search. You have tons of great information here but it’s really tough to find without the ability to search.

  3. I wish I’d found your post earlier! I’ve been cluttering up the wordpress support forum looking for that piece of information 🙂

  4. Hi Matt,

    Glad you fixed all the bugs on this wonderful site of yours. I seem to be coming here everyday now and just looking at all your photos. You have a cool life mate.

    Love from England (Dover)

    Best Regards,

    Les

SHARE YOUR THOUGHTS