Need some advice to add new background color

I recently install a free and responsive theme for my WordPress website. But I want to change the background color from white to green. How can I do that? Thanks for any ideal!

Are you familiar with HTML and CSS? You can quite easily change the styling on elements. (In this case, the green seems to be an inline CSS style—going by the demo.)

Try this:
Inside your header.php file, place this php block within your body tag like so:
<body <?php body_class('green-bg'); ?>>

green-bg being a new custom class you create in your style sheet thus:

.green-bg {
background-color: green;

body_class is a Wordpress function which allows you to customise the body tag’s properties.

See more info here:

If you go into your dashboard to Appearance > Customize and Select the option ‘colors’ you will see that the background colour can be customized there for this theme.

I tried it on a test site, however, and it did not make the post background colour green, it just made the site background colour green. I’m not sure if that is the look you are wanting.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.