is_archive() not working
-
I’ve been trying to use the is_archive() conditional in my sidebar to customize pages when they are archives. I created a custom archives page per instructions, but the new page does not trigger the is_archive() conditional.
The only real difference between my custom archive page and say, the archives.php page of the default wordpress theme is that the default archives.php page calls wp_get_archives(). I’m calling query_posts() with the query returning all posts within the current year to set up The Loop, in which I then print out the returned posts.
I suspect that is_archive() is not triggered unless a call is made to get_archives() or other such function. Anyone had any experience with this or know what is going on? How can I trigger is_archive()?
- The topic ‘is_archive() not working’ is closed to new replies.