• Resolved gxt15

    (@gxt15)


    I have created a beautiful custom header image in Canva for my site. I have successfully loaded it. I am using both pages and categories as my menu choices. I would like for the header image to only show up on my home page. Is it possible to achieve this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi gxt15
    Would it be possible to provide URL opf your site here?
    Thanx
    Cheers
    TR

    Thread Starter gxt15

    (@gxt15)

    That’s strange. I included the URL in my original post. Don’t know what happened to it. It is https://www.genxtraveler.com.

    Hi gxt15

    Put this code to your child theme style.css file

    or
    instal plugin Simple Custome CSS – watch VIDEO and put that css code there.

    #site-title a img {
        display: none;
    }
    
    #menu-item-118, #site-title a img {
        display: block!important;
    }

    Hope this will work on your site.
    Do not hesitate to ask for further help.
    Cheers
    TR

    OR
    if it does not work

    Try this:

    #menu-item-119, #site-title a img {
        display: none;
    }
    
    #menu-item-110, #site-title a img {
        display: none;
    }
    
    #menu-item-252, #site-title a img {
        display: none;
    }
    
    #menu-item-125, #site-title a img {
        display: none;
    }
    
    #menu-item-124, #site-title a img {
        display: none;
    }
    
    #menu-item-112, #site-title a img {
        display: none;
    }
    
    #menu-item-113, #site-title a img {
        display: none;
    }
    
    #menu-item-123, #site-title a img {
        display: none;
    }

    Let me know result.
    Cheers
    TR

    Thread Starter gxt15

    (@gxt15)

    TR,
    Tried these options. I installed the Simple Custom CSS. According to the video “Settings” option should have come up. It did not. I think it is possible that the plugin has not been updated for the newest version of WP 4.3. I looked to see if it was compatible and it shows as untested.
    Your second option, is that add on code or am I supposed to overwrite something. I assumed it was add on or stand alone. I tried it that way but everything remained the same.
    Any other suggestions or did I do something incorrect?
    Thanks

    Hi gxt15
    Sorry for delay. I was upo to some other issue and forget to post suggestioon here.

    So try these:

    Use body class in css.

    Home pages in WP have either “home” or a particular template used name (whatever you choose to be the home page) in the body class.

    As such, you can create CSS for “display:block” and “display:none” so that images only show up on or don’t show up on pages that match that body class.

    Body Class Reference CSS

    So concerning your pages/posts:
    Try put this to your style css plugin file

    .site-header {
        background: none;
    }
    
    body.archive.category.category-home.category-21.site-header {
        background-image:url('https://www.genxtraveler.com/wp-content/uploads/2015/09/cropped-2015-07-27-00.28.301.jpg') ;
    }

    Hope this will be helpfull ??
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    You can also do this with PHP, if you put in a conditional statement in the header.php file of your child theme to select whichever block you want. See:

    Function Reference/is front page

    Have a fun
    Cheers
    TR

    Thread Starter gxt15

    (@gxt15)

    Tahoe Rock,
    Thanks for all your help.
    gxt15

    Hi TR,

    I hope you are well today and thank you for helping on this forum.

    Your help here is really appreciated.

    Thanks,
    Movin

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Removing Header Image from some pages’ is closed to new replies.