• Resolved johannes999

    (@johannes999)


    hello,
    I have read in WordPress forum how to change header image on each page.
    so i have found the id of my page which I want another header .
    and I have paste this code in extra css:

    
    .page-id-7 #david-header-image  {
     content:url ('https://webdesignleren.com/wp-content/uploads/2020/04/AdobeStock-test.jpg '); 
    }
    

    plus I have inserted the image in page section above the page which I want another header.
    but it is not working the header is stil the

    what it can be the problem.
    thanks

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • @johannes999

    This seems like a strange approach in my opinion.
    However, you got it working ?
    Your image is displaying on this page.

    Hello Johannes,

    Your CSS is targetting the ID david-header-image

    However, I’ve searched through the code on the link you gave, and the referenced ID david-header-image doesn’t appear anywhere in your page’s HTML for the CSS to be applied to. So there’s no way that CSS is going to work.

    By the way, when you say “header image”, are you referring to the orange row, or are you trying to replicate your homepage’s banner image on this inner page? Can you please describe what you’re trying to accomplish, so we can help you?

    Thread Starter johannes999

    (@johannes999)

    thank you very much,
    I have forgot the html code .
    I have solved the problem in this way for a unique page like onderhoud.
    I have first removed the header with this css code:

    
    .page-id-7 .site-header {
    	display:none;
    }
    

    then I created html class in page section for unique header which is in my case the page name is (onderhoud)

    
    <div class="site-header-onderhoud">
    <p><img class="img-fluid" src="https://webdesignleren.com/wp-content/uploads/2020/01/home-1200.jpg"></p>
    </div>
    

    the I styled this site-header-onderhoud class in style.css
    and I solved the problem
    you can see on url:https://webdesignleren.com/?page_id=7
    this is just testing site it is going to be very proffesional after few months.
    I am at this moment learning to build responsive website .
    thank you very much for your answer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I tried to change the header of a page with code below but it is not working?’ is closed to new replies.