• Resolved dcroe05

    (@dcroe05)


    I want to add something to ONLY the VERY front page of my blog, above the first post. Kind of like a permanent Sticky Post.

    Right now I’m using this code:

    <?php if(is_home() ) { ?>
    Home
    <?php } else { ?>
    Not Home
    <?php } ?>

    However, this makes “Home” appear on every page that’s not part of an archive or category, etc. I need a way for only the very first page of posts.

Viewing 4 replies - 1 through 4 (of 4 total)
  • moshu

    (@moshu)

    So, where did you put this code above?
    Next, what is “every page”? Are we talking about Pages or something else?

    Thread Starter dcroe05

    (@dcroe05)

    Sorry…

    I put the code into the index.php file.

    Using the code I get “Home” on the front page of the blog, but then when I click on “previous posts” it still shows up. So obviously is_home looks at all paginations of the main posts as Home.

    But how can I make it show up only the absolute root of the blog posts?

    moshu

    (@moshu)

    Then you should have searched exactly for that: is_home first page only…
    https://www.ads-software.com/support/topic/149398?replies=9

    Thread Starter dcroe05

    (@dcroe05)

    Well, I did several searches, but obviously missed the right one…

    Thank you, very much, for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is ‘is_home’ what I’m looking for?’ is closed to new replies.