add_section( 'colors' , array( 'title' => 'Color Scheme', 'description' => 'Here you can change your menu, navbar colors for: Link, hover, and background. This configuration override Global Settings -> Skin.', 'priority' => 1, ) ); $colors = array(); $colors[] = array( 'slug'=>'header_color', 'default' => '#fff', 'label' => __('Header Color', 'customizr') ); $colors[] = array( 'slug'=>'footer_color', 'default' => '#333', 'label' => __('Footer Color', 'customizr') ); foreach( $colors as $color ) { // SETTINGS $wp_customize->add_setting( $color['slug'], array( 'default' => $color['default'], 'sanitize_callback' => 'sanitize_hex_color', 'type' => 'option', 'capability' => 'edit_theme_options' ) ); // CONTROLS $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $color['slug'], array('label' => $color['label'], 'section' => 'colors', 'settings' => $color['slug']) ) ); } } add_action( 'customize_register', 'customizr_color_customize_register' ); function customizr_color_customizer_head_styles() { $header_color = get_option('header_color'); $footer_color = get_option('footer_color'); ?>