The archives.php
template file is a custom page template file for a static Page. The is_archive()
and is_home()
conditionals apply to a blog posts archive and blog posts index, respectively.So, you’re never going to get is_archive()
to return true while displaying the output of archives.php
.
To have your archives.php
static Page appear in the menu:
- Create a new static Page, named whatever, e.g. “Archives” (but it is completely arbitrary)
- Assign the
archives.php
custom Page template to this static Page - Add this static Page to your custom Nav Menu
Then, you should see it highlighting properly in the menu.