WordPress is_home() Not Working

is_home() is a very usefull functions in wordpress. just like his name, there use to judge if the page is home page or not, so people can do something special setting in home page from this judge, but sometime, you will fond, it’s not working, is there something wrong? yes, it is. Cause another function name query_posts() be used in this file before is_home() function.

So, if you wont use this function, you must place another named wp_reset_query() before is_home(), like this:


I only will display in homepage! really~

this is cause when this page call is_home(), it will feedback a bool parameter “ture”, but query_posts() stop it.