Forums

[resolved] Several Archive pages (4 posts)

  1. unknownclubber
    Member
    Posted 2 months ago #

    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 !

  2. apljdi
    Member
    Posted 2 months ago #

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

  3. unknownclubber
    Member
    Posted 2 months 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
    Member
    Posted 2 months ago #

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

Reply

You must log in to post.

About this Topic