WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] is-home failing without static home page (3 posts)

  1. Sapphire
    Member
    Posted 6 years ago #

    I have some ads in my sidebar between is_home code, so they only show on my front page (which is the latest blog posts, not a static page). As soon as I installed 2.3 on two different blogs on two different hosts, is_home started showing those ads on not just my homepage, but on Page 2, Page 3, etc. that you get to by clicking "previous entries" at the bottom of the front page. The static pages, single post pages and archive pages do not show the ads, but any page full of regular blog entries in the order they were posted shows them.

    I'm aware of all the threads where people about is_home not working with a static page, then finding out there was a reason for this and a plugin that fixes it. That plugin did not help me.

    I've found only one other user in the forums who's having is_home not work even without a static home page, and it doesn't appear anyone has found a solution.

    Thanks in advance for any help.

  2. Sapphire
    Member
    Posted 6 years ago #

    Bumping this. Sorry, but it's really a problem for me as I don't know any other way to code something so it only shows up on the home page.

  3. Sapphire
    Member
    Posted 6 years ago #

    Okay, I did actually search the forums for this before, but I must've missed a trick. People are reporting that several different options are working for them, but here's the only solution that worked for me:

    <?php if ( (is_home())&&!(is_paged()) ){ ?>
    <h1>Welcome to my site, etc. etc.</h1>
    <?php } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic