• It’s possible to change the header image from a page and/or a post.

    Is it possible to change the header image only on pages with a featured image and nog on posts with a featured image? The featured image in a post is full-size in the post and doesn’t have to be in the header.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @ffortissimo,

    You can set the image to be a featured image on posts and pages, however, there is no way to split the appearance based on post type so for all WP posts(that includes pages) same rule will be applied:

    View post on imgur.com

    There is one workaround that might do the trick in this case. You can use this code to set a different image to be shown

    .single-post .site-header {
        background-image: url(https://yourwebsite.com/imageurlpath/imagename.jpg) !important;
    }

    This code targets only the posts and sets a different image that you need to specify by replacing the link with the image you normally use for the header.

    I hope this helps, have a nice day,
    Andrija

    Thread Starter ffortissimo

    (@ffortissimo)

    This does help a lot, thank you.

    But would it be possible to disallow the overwriting of the header image by de featured image in posts so it would only show the random headers?
    And also that pages still can use a featured image to set the header?

    Maybe I’m just to demanding ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change hero header image on page only’ is closed to new replies.