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.

I'm working on a theme with some options to change the design. For the options I am using the Theme customizer. With the theme customizer there are many option types like color, upload, image upload, background image and header image. I am adding the background image control with this code:

function tcx_register_theme_customizer( $wp_customize ) {
    $wp_customize->add_section(
            'tcx_advanced_options',
            array(
                    'title'     => 'Advanced Options',
                    'priority'  => 201
            )
    );

    $wp_customize->add_setting(
            'tcx_background_image',
            array(
                'default'      => '',
                'transport'    => 'postMessage'
            )
    );

    $wp_customize->add_control(
            new WP_Customize_Background_Image_Control(
                    $wp_customize,
                    'tcx_background_image',
                    array(
                        'label'    => 'Background Image',
                        'settings' => 'tcx_background_image',
                        'section'  => 'tcx_advanced_options'
                    )
            )
    );
}
add_action( 'customize_register', 'tcx_register_theme_customizer' );

but the control won't be displayed in the Theme Customizer. The same with the header image. 'Image Upload', 'Upload' and all other types like 'text', radio, etc. works fine. I don't want to use it with add_theme_support because i don't want the menu entries under the "Design" section because it can be confusing for the client. (Sry for my bad english :) )

Update: thats the code I am using. New section, new setting and the control for the Wordpress built-in Background Image.

share|improve this question
1  
Post enough code that your problem can replicated please. –  s_ha_dum Nov 20 '13 at 15:16
    
@s_ha_dum Thats the code I am using. Works with all types of control except Background Image and Header Image. –  Markus Schober Nov 25 '13 at 17:08
add comment

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.