• Resolved Ero77

    (@ero77)


    Hello folks,

    I’m trying to add an image header to my home page but it appears as well in my second page, 3rd page… and I only want it to appear on the first page of my blog.

    So far I used the following in the “front-page.php” with no success:

    <?php if (is_home()){xxx();};?>

    xxx being the formula from my functions.php file which triggers the image header.

    I’m not using (and I don’t want to) a static page as a home page. I need to keep using my blog as a home page, but I don’t want to show the pic when someone goes to page 2, 3… of the blog, neither in the single post.

    Please, any help will be much appreciated.

    Thank you!
    Enric

Viewing 1 replies (of 1 total)
  • Thread Starter Ero77

    (@ero77)

    just found a solution in case anyone has the same problem. Actually it was quite easy and logical…
    Instead of the php code I wrote previously, we need to apply the following code:

    <?php if (is_home() && !is_paged()){xxx();};?>

    Being xxx the name of the formula that calls the pic from my functions.php file.

Viewing 1 replies (of 1 total)
  • The topic ‘How to add a header pic ONLY to Home page (page1)’ is closed to new replies.