WordPress.org

Forums

is_archive over rides is_category... (1 post)

  1. Adam
    Member
    Posted 2 years ago #

    If I do something like:

    if(is_category()){
        echo "category";
    }elseif(is_archive()){
        echo "Archive";
    }

    what I get is "category" for pages like /category/test which is what I want. How ever if I create an archive.php file and then give it template name: archive, upload it and set it as a page titled archive and then go to "category/test" I now see "Archive" when I should see "category"

    Any thoughts?

Topic Closed

This topic has been closed to new replies.

About this Topic