- This topic has 10 replies, 2 voices, and was last updated 9 years, 6 months ago by .
Viewing 11 posts - 1 through 11 (of 11 total)
Viewing 11 posts - 1 through 11 (of 11 total)
- You must be logged in to reply to this topic.
Home › Community Forums › Epik Theme Support › Page and post background colour
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
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.
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.
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.
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.
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) ?
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?
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.
Hi Wes, yes the first idea worked. I’ve not tested the second.
Thanks for your help.
You’re Welcome!
Just let me know if you need anything else.