WordPress.org

Support

Support » How-To and Troubleshooting » is_archive over rides is_category…

is_archive over rides is_category…

  • 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?

  • The topic ‘is_archive over rides is_category…’ is closed to new replies.
Skip to toolbar