0

This question is related to my earlier question, but I think it's specific enough to qualify as a standalone question.

I am modifying an existing theme (the Twenty Ten theme that ships with WordPress), and I would like to completely control the colors used. The Admin Screen allows the administrator to select a background color, and this seems to be implemented in one of the actions that are automatically registered to the wp_head hook (listed by Bainternet here).

So I would like to do two things:

  • Remove the Color Options menu from the Admin Screen when my theme is activated. Is this possible and if so, how would I go about doing this? (Links to documentation welcome!)
  • Remove the automatically registered action to wp_head that controls the color. Which action in particular would be responsible for this? (rsd_link, etc?)

Thanks for your help.

1 Answer 1

0

In TwentyTen’s functions.php the custom background is added in twentyten_setup() which is called on the action 'after_setup_theme'.

So, in your child theme, the following should remove the option completely:

// Higher priority to work after TwentyTen
add_action( 'after_setup_theme', 'wpse12934_remove_custom_background', 20 );

function wpse12934_remove_custom_background()
{
    remove_custom_background();
}
2
  • Thanks. Really basic question - where would I add this? :)
    – user4184
    Commented Mar 24, 2011 at 14:58
  • @ephemeral In your child theme’s functions.php.
    – fuxia
    Commented Mar 24, 2011 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.