S
S
Sergey Volkov2021-07-08 07:08:31
WordPress
Sergey Volkov, 2021-07-08 07:08:31

Why is the menu not displayed in the customizer?

Here is my code:

$wp_customize->add_section('background_section', array(
    'title' => 'Фоновое изображение',
    'priority'       => 30,
    // 'panel' => 'background',
));
$wp_customize->add_setting('background_setting', array(
    'default'        => '',
));

$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'background_setting', array(
    'label'      => 'Фоновая картинка',
    'section'    => 'background_section',
    'settings'   => 'background_setting',
)));


But the menu with the background image is not displayed in the customizer.
I think I'm using WP_Customize_Background_Image_Control somehow wrong, because when I insert WP_Customize_Image_Control everything works fine.
60e679ef1ee84317282563.jpeg

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question