WordPress.org

Forums

Adamos
[resolved] Remove header image from Posts page (6 posts)

  1. asirangelo
    Member
    Posted 1 year ago #

    Hi, I want to display the header image on my HOME PAGE ONLY, so I edited the header.php and introduced the code <?php if( is_home() || is_front_page() ) : ?> before the 'get header' image command. It worked... but the header image is also appearing on the "blog" page. That's the ONLY page beside the Home Page that the header image is showing. What code do I insert so I can I make sure the header image doesn't show on the blog page?

    The "blog" page is the one containing all my recent posts, the one assigned as the Posts page on the Customize > Static Front Page menu. And yes, my home page is a Custom Hope Page. My website is http://www.lastbroadcastcomic.com.

    Thank you!

  2. Template Express
    Member
    Theme Author

    Posted 1 year ago #

    Hello, just checked out your website and your blog page looks fine - I guess you fixed your problem?

  3. asirangelo
    Member
    Posted 1 year ago #

    Hi! Yeah, so the only way I could fix it was to add and then remove the header image from the Customize > Header screen, then use the HP Display Header plug in to add the header image to the home page only. But since I don't know a lot about code I still don't understand why the header image was showing on the Posts page if I used the 'if is home ' command.

  4. catquecaos
    Member
    Posted 2 months ago #

    Hi, I also want to display the header image on my homepage only, and I don't have a blog page so I won't have the same problem as asirangelo. I tried the solution they said worked for them (introducing the code in header.php) but nothing happened. Image still appears on all pages.

    Any idea what I could be doing wrong? I am new to code to possibilities are many :)

  5. catquecaos
    Member
    Posted 2 months ago #

    Nevermind! I found another thread called Delete header image on pages

    Told me I had to delete part of the code then add something different. It worked.

  6. Template Express
    Member
    Theme Author

    Posted 2 months ago #

    OK great

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic