What's the difference between archive.php and archives.php?
My copy of WordPress Plugin Development by the lovely Vladimir Prelovac has just arrived, so excuse me if I have my nose in the book the for the rest of the day
Just a quickie because this comes up in Google searches just about every day - what's the difference between archive.php and archives.php?
It's quite possible that your theme doesn't have these two confusingly named files: but WordPress Default does, and many themes have copied it.
archive.php (labelled Archives in the theme editor) is the file used to generate monthly, category and author archive pages. So if you're looking at all the posts for June 2009 or all the posts for the "Angry Rants" category, or all the posts written by Bob the Builder, in most themes, that's archive.php.
archives.php (labelled Archives Page Template in WordPress Default) is a page template which produces lists of links to your old posts. If you've got a very long-standing blog, you might prefer to use an archive page rather than having five years' worth of monthly links and 87 categories in your sidebar. You can see my version here. If your theme doesn't have one, here's how to make one.
Tags: archive.php, archives
Posted by Sue on July 24, 2009 in WordPress.








is archives.php necesary to exist in the theme's folder?
Hi Ignacio,
No, neither file is necessary. archives.php isn't necessary at all: you just won't have a page template called that.
If archive.php doesn't exist, then WordPress will follow the template hierarchy and use index.php to produce your date/category/author archives. More info and a large diagram here:
http://blogmum.com/2009/08/how-a-wordpress-theme-works/