Add color to header
-
Hello guys..
I have a bit of struggle to change the color in the header. I like to have a “Customising
Colours” in the customizer.Here is some code I tried to use, but no luck:
inc/customizer.php
//header-color
$wp_customize->add_control(
new WP_Customize_Control(
$wp_customize,
‘understrap_header_color’, array(
‘label’ => __( ‘Header Color’, ‘understrap’ ),
‘description’ => __( “Choose the color behind the logo and navigation”, ‘understrap’ ),
‘section’ => ‘colors’,
‘settings’ => ‘understrap_header_color’,
‘type’ => ‘color’,
‘default’ => ‘#0098ca’,
‘priority’ => ’30’,
‘transport’ => ‘refresh’,
)
) );and this code also….:
function my_add_header_support() {
$chargs = array(
‘width’ => 980,
‘height’ => 60,
‘default-text-color’ => ”,
‘default-image’ => ”,
‘uploads’ => true,
);
add_theme_support( ‘custom-header’, $chargs );
}
add_action( ‘after_setup_theme’, ‘my_add_header_support’ );But it dosen’t work, I will guess there is a lot of faults…
- The topic ‘Add color to header’ is closed to new replies.