Mar
4

Archives Page Tip

Filed under: Asides, WordPress | March 4th, 2006
Post

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)

7 Responses

Avatar

Matt Biscay | March 4th, 2006 @ 3:31 am

I’m using Extended Live Archive to tidy up my archives. I love it :)

Current score: 0
Avatar

Alistair Phillips | March 4th, 2006 @ 5:46 am

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?

Current score: 0
Avatar

Lorelle | March 7th, 2006 @ 7:36 am

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.

Current score: 0
Avatar

Mark | March 14th, 2006 @ 6:46 am

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

Current score: 0
Avatar

Les Sharma | May 26th, 2006 @ 5:07 am

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

Current score: 0

Share your thoughts