• Hi all,

    I’ve noticed that if you open a link to an empty date-based archive (say, http://www.example.com/2009/ or http://www.example.com/2009/12/30/), you are redirected to your theme’s 404.php page, but if you open a link to an empty category archive (say, http://www.example.com/categories/my-category/), archive.php loads, and whatever code/markup is in the else part of your if (have_posts()) statement is executed.

    Can anyone explain this difference in behaviour? Ideally I’d like archive.php to load in all cases, which would allow me to display a more useful message to the user in this else area using the relevant conditional tags for that archive type.

The topic ‘Empty date archive vs empty category archive’ is closed to new replies.