• I need the big image on the first page only. how do I remove the header image from the rest of the pages? or If it is possible to use different header images per page?

Viewing 9 replies - 1 through 9 (of 9 total)
  • you can do that with if

    <?php
    if (is_page(1))
    ?>

    “1” is the page id you can also do this:

    <?php
    if (is_post(1))
    ?>

    you can find page id in url

    <?php if(is_home) { ?>
    <?php if( get_header_image() ): ?>
    <div id="custom-img-header"><img src="<?php echo header_image(); ?>" alt="" /></div>
    <?php endif; ?>
    <?php } ?>

    this is a option to.

    You can find this in header.php delete the code:

    <?php if( get_header_image() ): ?>

    and place the code i gave you instead!

    that should work ??

    I can’t find where this
    <?php if( get_header_image() ): ?>
    is located

    Was it moved to another file?

    i’m also looking for this..

    Hello,
    The same for me.
    This content : <?php if( get_header_image() ): ?> is maybe in an other file ?
    Thanks for your help
    PAx
    https://www.pax.paris/

    Anyone ever solve this?

    I’d like for the featured image to be the header as is common in most themes.

    Thanks!

    Someone has solved?
    I’m searching for the same

    I don′t know how to remove the image of the others pages/post; but to change the header image in every page/post you only need to activate in the page/post editor (screen option) the option: Custom Header Image

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Different header per page’ is closed to new replies.