Header image to appear on front page only.

  • Unknown's avatar

    Hi,

    I’m trying to get my header image to appear on my front page only. Alternatively if I could get it to appear on a main blog page but not any other pages that would also be good.
    I’ve tried putting

    .page #headerimg {
    display: none;}

    into CSS but it hasn’t worked.

    Thanks

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    I’m trying to get my header image to appear on my front page only.

    You can use a static front page with a featured image. The image at the top will not technically be a custom header image, but it may serve as one.

  • Unknown's avatar

    With the Edin theme you’re using, a static front page with a Featured Image (as musicdoc1 mentioned) can be a great way to put a header image on your front page without showing it elsewhere on your site, as long as you want a front page with static content instead of a blog. The Edin theme also includes a Front Page template to create the layout you see on the theme’s demo site:

    https://edindemo.wordpress.com/

    You can also use CSS to show and hide your header image on specific pages, if you prefer. For example, CSS like this will hide the header image everywhere:

    .header-image img {
      display: none;
    }

    You can add that, and then add this specific CSS to show the header image again on your site’s front page:

    .home .header-image img {
      display: block;
    }

    I found that CSS using the tips in the guide to How to Find Your Theme’s CSS. Let me know how that goes!

  • Unknown's avatar

    That CSS works. I had a look at ‘How to Find Your Theme’s CSS’ too.
    Thanks

  • The topic ‘Header image to appear on front page only.’ is closed to new replies.