Support » Fixing WordPress » Several Archive pages

  • Resolved unknownclubber

    (@unknownclubber)


    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 !

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.php

    That 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 😀

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Several Archive pages’ is closed to new replies.