Empty date archive vs empty category archive
-
Hi all,
I’ve noticed that if you open a link to an empty date-based archive (say, https://www.example.com/2009/ or https://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, https://www.example.com/categories/my-category/),archive.php
loads, and whatever code/markup is in theelse
part of yourif (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 thiselse
area using the relevant conditional tags for that archive type.
- The topic ‘Empty date archive vs empty category archive’ is closed to new replies.