Я создал панель параметров в WordPress customizer.php:
// Add theme options panel.
$wp_customize->add_panel(
'anvitest-lite', array(
'title' => esc_html__( 'Theme Options', 'anvitest-lite' ),
'priority' => 11,
)
);
Чем я добавил раздел:
$wp_customize->add_section(
'title_section', array(
'title' => esc_html__( 'Main Screen Section', 'anvitest-lite' ),
'panel' => 'anvitest-lite',
)
);
До этого момента все работало нормально. Но в разделе мне нужно отобразить четыре поля с контактами (почта, адрес и номер телефона). Я создаю поля:
/**************************email_field****************************/
$wp_customize->add_setting(
'email_field', array(
'default' => ''
)
);
$wp_customize->add_control(
'title_section', array(
'label' => esc_html__( 'Enter E-mail', 'anvitest-lite' ),
'section' => 'title_section',
'settings' => 'email_field',
'type' => 'email',
'description' => esc_html__( 'Enter your mail in this field', 'anvitest-lite' ),
)
);
/**************************phone_field****************************/
$wp_customize->add_setting(
'phone_field', array(
'default' => ''
)
);
$wp_customize->add_control(
'title_section', array(
'label' => esc_html__( 'Enter Phone', 'anvitest-lite' ),
'section' => 'title_section',
'settings' => 'phone_field',
'type' => 'text',
'description' => esc_html__( 'Enter your phone in this field', 'anvitest-lite' ),
)
);
/**************************adress_field****************************/
$wp_customize->add_setting(
'adress_field', array(
'default' => ''
)
);
$wp_customize->add_control(
'title_section', array(
'label' => esc_html__( 'Enter Adress', 'anvitest-lite' ),
'section' => 'title_section',
'settings' => 'adress_field',
'type' => 'text',
'description' => esc_html__( 'Enter your adress in this field', 'anvitest-lite' ),
)
);
Но из этого в настройщике отображается только поле для ввода адреса электронной почты. см. экран: http://prntscr.com/nt891d. Пожалуйста, скажите мне, что я делаю не так. Спасибо!