Hello!
I'd like to use different archive pages to display different categories. I tried to use if(in_category()) but the code in archive.php is really becoming complicated.
Thanx in advance !
Hello!
I'd like to use different archive pages to display different categories. I tried to use if(in_category()) but the code in archive.php is really becoming complicated.
Thanx in advance !
Use category templates instead. Will that not work for you?
I'll try this :
In the case of categories, the hierarchy is fairly simple. For instance, suppose the ID number of the Category in question 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:
1. category-6.php
2. category.php
3. archive.php
4. index.phpThat is, if you do not have a category-6.php, WordPress will check for a category.php, and so on.
I'll tell you if it works
Thanks for FAAAST anwser apljdi ;)
AWESOME ! And so simple... Just what i needed, THANKS :D
You must log in to post.