change background on pages

Hi,

I worked on the belawyer5 theme and change the demo background image, but now

I would maintain the image only in two pages (homepage and "contatti") and in the other pages set as background a simple grey #5F6469, that because on the header the background image isn't display as I want.

Link: https://studiocantoni.sviluppo.host/


Comments

  • Hi,

    from what I can see, you set this background image for entire site globally under Theme Options > Global > General. If you want to keep image on individual pages, you shouldn't set it for entire site globally. Instead, I recommend to set background image for specific section/s but solid background color for other.


  • it doesn't work because it works on the section and not in the header. The background image still visible in the header

  • i'm trying with that extra css cod

    @media only screen and (min-width: 768px) {

      .page-id-94 .tr-menu.header-creative #Header_creative:not(.active) {

        background-color: #8A8D93 !important;

      }

    }

    What i would to do is adding all the page id of the site except the page id of "home" and " contatti" but it doesn't work. It works globally removing .page-id- from the code, but if i put .page-id-... it doesn't work. Any tips?

  • If you want to make it with custom css, then you have to remove background image from theme options as it's set globally and use the following custom css to assign bg image for specific pages only. Below declaration is for homepage only.

    .page-id-6 {
      background-image: url(https://studiocantoni.sviluppo.host/wp-content/uploads/2025/01/prova-home-sam-5.jpg#372);
      background-repeat: no-repeat;
      background-position: center top;
      background-size: contain;
    }
    
  • ok, i did. thank you!

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.