WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using a child of Twenty Twelve, I've been adding color to all the major containers (#main, #content, #secondary, etc.) using

#arbitrary-id {
 background-color: #dedede;

This works for everything but body. I should be more clear: it changed the body background color until I messed with the background color in "Appearance -> Background". Now no matter what I try, I can't override that.

Looking in the HTML of the page and inside the <head> I see:

<style type="text/css" id="custom-background-css">
body.custom-background { background-color: #e6e6e6; }

Naturally, I tried to change the color using that selector, but since it's generated internally, that trumps the external CSS.

I'm at a total loss for how to do this. How do I change the background color of the body using CSS?

share|improve this question
up vote 3 down vote accepted

It sounds like you just need to remove support for the custom background color.

remove_theme_support( 'custom-background' );

You will probably need to hook it to get it to run after the parent functions.php

function disable_bg_wpse_97248() {
    remove_theme_support( 'custom-background' );
share|improve this answer
That worked perfectly. You are a gentleman and a scholar. I'm very new to all this so I appreciate the full explanation. – Tomulent Apr 25 '13 at 18:09

Look in your functions.php for somehting like:

add_theme_support( 'custom-background', array(
    'default-color' => 'e6e6e6',

Remove it, then you can use your CSS to change the background color.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.