Support » Theme: Primer » Headers are cropped except for Home Page

  • Resolved goodsuccess

    (@goodsuccess)


    The header image size is 2400×1300 and looks great on the homepage. However, it is cropped on the rest of the pages. How can we make this change? Would like to use css customizer.
    Thanks in advance for your help.

    • This topic was modified 1 year, 5 months ago by  goodsuccess.
    • This topic was modified 1 year, 5 months ago by  goodsuccess.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @goodsuccess,

    Take a look at the following thread which appears to be a similar question:
    https://wordpress.org/support/topic/header-image-cuts-off-2/

    In short, what you’d want to do is add the following small snippet of CSS to the ‘Additional CSS’ section of the customizer:

    .site-header {
       min-height: 435px;
    }

    Evan

    Thanks, for the quick reply. This worked to perfection. I’ve got one more question is there a way to add a different header image to each page?

    There isn’t built into the plugin, but it certainly would be possible using a little bit of CSS for each page. You can target each page based on the page ID. The page ID can be grabbed from the URL on each page edit screen, or by viewing the markup of the page in your browser and checking the bode class (eg: page-id-413 – Example https://cldup.com/Dj5s7hXfd8.png)

    As an example, on the page Rifles for Sale, your CSS would be:

    body.page-id-413 .site-header {
      background-image: url( "https://i.pinimg.com/originals/80/6d/8b/806d8b18271c92a55dd9eadb3f3315d9.png" );
    }

    Where the background-image URL would be a URL to an image in your media library, or to an external image of your choosing.

    This can be done on a per page basis.

    As another example, on your Parts page, the CSS would be:

    body.page-id-235 .site-header {
      background-image: url( "https://gun.deals/sites/default/files/5f35ffd53d47591e7f85a2125e9f5882.jpg" );
    }

    Evan

    Thanks, this is exactly what I was looking for.

    No problem at all – I hope you enjoy the rest of your weekend!

    Evan

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Headers are cropped except for Home Page’ is closed to new replies.