is_home(), is_archive() not Working? Here is a Fix

Posted by admin in Wordpress Tips, Solu... | 01.17.2010 - 3:50 am

Quite recently, is_home() and is_archive() stopped working for me. I mean, that these conditional tags stopped working for me and the intended code I had was not performing as expected.
I did a bit of digging around, however I did not find any conclusive answers to what was wrong. However, I did find a solution at this forum post, and after including an additional snippet it started working fine.
If you are facing a problem with the is_home() function, you can use the wp_reset_query(); function before you use the conditional checks to fix the issue.
I am still looking into the internal code as to why this is happening, will update the post once I find an answer to this problem.
Technorati Tags: blog

Original post by Keith Dsouza

    Technorati Tags: