Fixed Wordpress is_home error
by Sapphire (October 5, 2007)
As I mentioned before, when I upgraded to Wordpress 2.3, my “is_home” tag started returning the homepage-only stuff on not just the home page, but every “page” you get by clicking “previous entries” - “/page/2″, /page/3″, etc.
I searched for a week, combing the Wordpress forum, leaving a post that got no responses. Finally, I found an answer that works on my sites:
<?php if ( (is_home())&&!(is_paged()) ){ ?>
<h1>Welcome to my site, etc. etc.</h1>
<?php } ?>
This includes the homepage while excluding all those other “pages” (not to be confused with static pages, a whole other animal).
Other people are reporting that various other solutions worked for them; this was the only one that did the trick for me. I have no idea why; I’m just glad I found it.



December 22nd, 2007 at 10:20 pm
YOU ARE A LIFE SAVIOUR!
Thanks for posting this!
December 22nd, 2007 at 11:22 pm
You’re very welcome!
February 6th, 2008 at 6:02 pm
I, too, found nothing about this fix (or is_paged() in general) on the Codex. My “Recent” posts query in the left sidebar was not playing nice with /2, /3, etc — this worked like a charm! Thanks for taking the time to post it,
February 21st, 2008 at 10:33 pm
[...] Note: found the fix. [...]
March 18th, 2008 at 11:17 am
[...] some loyal readers, and I also have people who show up, thank me profusely for the answer to the Wordpress is_home problem, or whatever I’m ranking highly for that week, and go away never to be heard from again. [...]