[resolved] Several Archive pages (4 posts)

  1. unknownclubber
    Posted 5 years ago #


    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 !

  2. s_ha_dum
    Posted 5 years ago #

    Use category templates instead. Will that not work for you?

  3. unknownclubber
    Posted 5 years ago #

    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 ;)

  4. unknownclubber
    Posted 5 years ago #

    AWESOME ! And so simple... Just what i needed, THANKS :D

Topic Closed

This topic has been closed to new replies.

About this Topic