Background color not changing dynamically with WP3.4 customize panel
-
Hi and thanks for any help in advance.
I’m trying to add the new custom-background option to my theme. I never used the previous (pre 3.4) custom background technique so I’m starting from scratch.
The problem I’m encountering is that the color is not changing dynamically with the theme customize panel, though it works once I’ve clicked “Save & Publish”.
The steps I took to include it were declaring in functions.php:
$defaults = array( 'default-color' => 'fff', 'default-image' => get_template_directory_uri() . '/img/background.jpg', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-background', $defaults);
Then added
wp_head();
to my header followed bybody_class();
to my body tag, all of which works perfectly.I don’t know if I’ve missed something but the Customize Panel is not changing the color styling of
body.custom-background
selector until save.Thanks again.
- The topic ‘Background color not changing dynamically with WP3.4 customize panel’ is closed to new replies.