Page and post background colour

Homepage Community Forums Epik Theme Support Page and post background colour

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #11205
    GuiLois
    Customer

      Hey all, how can I change the background colour of posts and pages without it effecting the settings in the home page. I’m not talking about the colour behind the text on posts and pages but the actual background which is controlled in the customize menu option. The problem is that setting also changes the home page in places.

      Thanks

      #11222
      Wes
      Moderator

        Do you have a link with an example? I can tell you exactly what you’ll need to change/add if I can see what everything looks like.

        #11304
        GuiLois
        Customer
          This reply has been marked as private.
          #11313
          Wes
          Moderator

            You could just add a background color for the homepage with this –

            .home {
            	background: #ff0000;
            }

            …then change any other page with whatever color you want. The above code will only affect the homepage, and any other colors you use won’t affect the homepage.

            #11336
            GuiLois
            Customer

              Hi Wes, no the link I gave you showed a post page not the home page. Please can you advise on the post page background only please.

              #11345
              Wes
              Moderator

                I gave that code above to keep the homepage color the same (regardless if you change the color on your other pages using the background image/color page) since you mentioned "change the background colour of posts and pages without it effecting the settings in the home page". So you can add that code and then change the background color for your other pages and the homepage won’t be affected.

                #11349
                GuiLois
                Customer

                  Right I’m with you Wes. Ok thank you. Can you advise how can I change the post page colour (not the post text area itself) ?

                  #11350
                  GuiLois
                  Customer

                    I have added:

                    .home {
                    	background: #ff0000;
                    }

                    to style.css

                    yet if I change the home page color using the option in the:
                    /wp-admin/customize.php

                    it still changes the home page.

                    I tried adding the above code to home.php but that didnt work either.

                    Can you advise please?

                    #11364
                    Wes
                    Moderator

                      You can add .site-container to it –

                      .home .site-container {
                      	background: #ff0000;
                      }

                      or !important –

                      .home {
                      	background: #ff0000 !important;
                      }

                      either one should work to make the homepage background color show up.

                      #11379
                      GuiLois
                      Customer

                        Hi Wes, yes the first idea worked. I’ve not tested the second.

                        Thanks for your help.

                        #11387
                        Wes
                        Moderator

                          You’re Welcome!

                          Just let me know if you need anything else.

                        Viewing 11 posts - 1 through 11 (of 11 total)
                        • You must be logged in to reply to this topic.