Reputation: 105
I have two categories of posts on my site, for which I'd like to use the archives.php
page.
I've already used it for REFERENCES.
I want to now use it for posts with a category of NEWS, but the customisations I've done for REFERENCES don't really work. Is there a way I can break to one archive page into two, or have a second archives.php
page?
Upvotes: 1
Views: 4038
Reputation: 26065
The Codex is very useful. That said:
http://codex.wordpress.org/Category_Templates
In the case of categories, the hierarchy is fairly simple. For instance, suppose the slug of the Category in question is news and the Category ID is 6. The Template Hierarchy specifies that WordPress will use the first Template file it finds in your current Theme's directory from the following list:
- category-slug.php (Note: available with Version 2.9)
- category-ID.php
- category.php
- archive.php
- index.php
That is, if you do not have a category-slug.php (lets say category-news.php), WordPress will check for a category-ID.php (like category-6.php), and so on.
Upvotes: 2