4
Archives Page Tip
Filed under: Asides, WordPress | March 4th, 2006
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)






Share your thoughts