'text_color_first', 'default' => '#222222', 'label' => __('Box Text Color', 'annina') ); $colors[] = array( 'slug'=>'header_background_fourth', 'default' => '#222222', 'label' => __('Header Background', 'annina') ); $colors[] = array( 'slug'=>'box_color_second', 'default' => '#ffffff', 'label' => __('Box Background Color', 'annina') ); $colors[] = array( 'slug'=>'special_color_third', 'default' => '#dd4c39', 'label' => __('Special Color', 'annina') ); foreach( $colors as $color ) { // SETTINGS $wp_customize->add_setting( $color['slug'], array( 'default' => $color['default'], 'type' => 'option', 'sanitize_callback' => 'sanitize_hex_color', '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', 'annina_color_primary_register' ); /** * Add Custom CSS to Header */ function annina_custom_css_styles() { $text_color_first = get_option('text_color_first'); $header_background_fourth = get_option('header_background_fourth'); $box_color_second = get_option('box_color_second'); $special_color_third = get_option('special_color_third'); ?>