Viewing 15 replies - 1 through 15 (of 35 total)
  • Moderator t-p

    (@t-p)

    Thread Starter Robert

    (@robbieb1953)

    Hey Tara, thanks for that…

    Feature image allows me to have a feature image near the top of the page but the header image is still above it as it appears on all of the other pages. The theme is twenty fourteen.

    Moderator t-p

    (@t-p)

    Thread Starter Robert

    (@robbieb1953)

    Thanks, Tara.

    That last thread referenced appears to be 2 different approaches which seem to contradict one another. I started with the header-secondary.php but was not able to succeed, too confusing.

    Thread Starter Robert

    (@robbieb1953)

    There is probably a way to do it with css.

    I tried this:

    .post-xxxx, .site-header img {
    	display: none;
    }

    but it removed the image from all of the pages. Am I close here?

    Which page are you wanting a different header image on?

    Also, make sure you are working with a child theme!

    Thread Starter Robert

    (@robbieb1953)

    respectyoda, I want a different header image on a new page I am creating which is not public yet. Yes I use a child theme.

    OK. Here’s a simple way to do this.

    Upload the header image to the Media Library then in the stylesheet located in the child theme folder, use this code.

    .page-id-xx .site-header img{
      background-image: url('http://robbieburnsreturns.com/wp-content/uploads/2014/01/cropped-Robbie-Burns-Rocks.png') !important;
    }

    Replace xx with the appropriate page id and replace the url of the image with the url you can copy and paste from the media library of where the image is located.

    Thread Starter Robert

    (@robbieb1953)

    No success. The original image is still showing.

    Thread Starter Robert

    (@robbieb1953)

    respectyoda, I amended the code to .post-xx and the new image appeared, but it appears as a background image(which I see is indicated in the code) below the header image . It’s the site header image I want to replace on that page.

    You can’t use .post-xx because it will not work that way.

    Thread Starter Robert

    (@robbieb1953)

    Understood. Just experimenting because the .page-id-xx didn’t work either. The new image was not visible as header or background image.

    This may require editing the header.php file. How comfortable are you with coding?

    Thread Starter Robert

    (@robbieb1953)

    I’ve done some successfully. Primarily cut and paste – but it is a child theme and I want to learn.

    OK. Now, copy the header.php file from the parent theme folder and put it in the child theme folder. Then post the contents of it here. Make sure you use code tags.

Viewing 15 replies - 1 through 15 (of 35 total)
  • The topic ‘Different header images on different pages’ is closed to new replies.