Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

when i try this and in colors section , get_theme_mod works well

function tcx_register_theme_customizer( $wp_customize ) {
    $wp_customize->add_setting(
        'tcx_link_color',
        array(
            'default'     => '#000000',
            'transport'   => 'postMessage'
        )
    );
$wp_customize->add_control(
    new WP_Customize_Color_Control(
        $wp_customize,
        'link_color',
        array(
            'label'      => 'Link Color',
            'section'    => 'colors',
            'settings'   => 'tcx_link_color'
        )
    )
);

but when i create a section and want to use it , get_theme_mod return a blank value

$wp_customize->add_section( 'page_styling', array(
        'title'          => __( 'Background Colors', 'swift-framework-admin' ),
        'priority'       => 210,
    ) );

    $wp_customize->add_setting(
        'tcx_fontss_color',
        array(
            'default'     => '#000000',
            'transport'   => 'postMessage'
        )
    );

    $wp_customize->add_control(
        new WP_Customize_Color_Control(
            $wp_customize,
            'fonts_color',
            array(
                'label'      => 'Test',
                'section'    => 'page_styling',
                'settings'   => 'tcx_fontss_color'
            )
        )
    );
}
add_action( 'customize_register', 'tcx_register_theme_customizer' );

what should i do ? my wordpress version is 3.9.1 and using php 5.3 if you need more detail let me know thanks

share|improve this question
    
Are you sure you are using the right setting slug-- tcx_fontss_color? Notice the "ss". –  s_ha_dum May 16 at 13:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.