• Resolved ggoldblatt

    (@ggoldblatt)


    Hi there,

    While I like the large header image on my landing page, I want to try and have it hidden on some of the subsequent pages. I’ve looked at a lot of blog posts, but they are now making sense to me (sorry, I’m new at this). I can find the Style.css editor, but now sure where to add code for individual pages. Or is there a plugin that can do this?

    https://moonshinemicrodistillery.com

Viewing 7 replies - 1 through 7 (of 7 total)
  • You can add sitewide CSS code that only affects specific pages thanks to the body class.

    Which pages exactly are you looking to remove the header image from?

    Thread Starter ggoldblatt

    (@ggoldblatt)

    Thanks for replying ??

    I guess just have the large photo on the main landing page. The others probably not, but still will want to toy around with the look of everything. So, the front page yes, the others no.

    You’re welcome!

    First, you’re going to want to install a plugin like Simple Custom CSS to make sure your changes get preserved in case the developer ever updates the theme.

    Then, use the following CSS code:

    body:not(.home) .header-image {
    	background-image: none !important;
    	max-height: 0;
    }
    
    body:not(.home) .content {
    	margin-top: 0;
    }

    The :not(.home) part is essentially targeting everything but your homepage.

    Thread Starter ggoldblatt

    (@ggoldblatt)

    This works, thank you! I just have to be careful to designate which page is will be the Static Front Page, then rest will not have the image header.

    I believe the “home” class will be added to whichever page you designate as the static front page, so this could should still work even after that.

    But if it doesn’t, feel free to update this thread and we can reevaluate.

    How about the opposite here, removing the header image ONLY from the home page?

    Hi
    I have a slightly different requirement. How do I create a header image just for a particular page and not use my landing page header image.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Removing header image from a single page?’ is closed to new replies.