Adding a color selector to the customizer

Place in functions file

Sets a color to be applied to the “a” attribute

Sets a color to be applied to the h1, h2, h3, h4, h5, h6 attributes

//SETTING UP THE NEW COLOR CONTROL: LINK
function pdog1_register_theme_customizer( $wp_customize ) {
    $wp_customize->add_setting(
        'pdog_link_color',
        array(
            'default'     => '#00649c'
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'link_color',
            array(
                'label'      => __( 'Link Color', 'tcx' ),
                'section'    => 'colors',
                'settings'   => 'pdog_link_color'
            )
        )
    );
}
add_action( 'customize_register', 'pdog1_register_theme_customizer' );

//JMC THIS APPLIES THE COLOR ABOVE AS A CSS OVER-RIDE
function pdog1_customizer_css() {
    ?>
    <style type="text/css">
       a { color: <?php echo get_theme_mod( 'pdog_link_color' ); ?>; }
    </style>
    <?php
}
add_action( 'wp_head', 'pdog1_customizer_css' );

Sets a color to be applied to the “a” attribute

//SETTING UP THE NEW COLOR CONTROL: HEADINGS COLOR
function pdog5_register_theme_customizer( $wp_customize ) {
    $wp_customize->add_setting(
        'pdog_headings_color',
        array(
            'default'     => '#322215'
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'headings_color',
            array(
                'label'      => __( 'Headings Color', 'tcx' ),
                'section'    => 'colors',
                'settings'   => 'pdog_headings_color'
            )
        )
    );
}
add_action( 'customize_register', 'pdog5_register_theme_customizer' );
//JMC THIS APPLIES THE COLOR ABOVE AS A CSS OVER-RIDE
function pdog5_customizer_css() {
    ?>
    <style type="text/css">
      h1, h2, h3, h4, h5, h6 { color: <?php echo get_theme_mod( 'pdog_headings_color' ); ?>; }
    </style>
    <?php
}
add_action( 'wp_head', 'pdog5_customizer_css' );

Sets a color to be applied to the h1, h2, h3, h4, h5, h6 attributes