Adding a Customizer Text Control:

$wp_customize->add_control('custom_text', array( 'label' => __('Custom Text', 'text-domain'), 'section' => 'custom_section', 'settings' => 'custom_setting', 'type' => 'text', ));

Adding a Customizer Image Control:

$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'custom_image', array(
    'label' => __('Custom Image', 'text-domain'),
    'section' => 'custom_section',
    'settings' => 'custom_setting',
)));

Adding a Range Control:

$wp_customize->add_control('custom_range', array( 'label' => __('Custom Range', 'text-domain'), 'section' => 'custom_section', 'settings' => 'custom_setting', 'type' => 'range', 'input_attrs' => array( 'min' => 0, 'max' => 100, 'step' => 1, ), ));

Adding a Dropdown Control with Dynamic Options:

$dynamic_options = array('option1' => 'Option 1', 'option2' => 'Option 2');
$wp_customize->add_control('custom_dropdown', array(
    'label' => __('Custom Dropdown', 'text-domain'),
    'section' => 'custom_section',
    'settings' => 'custom_setting',
    'type' => 'select',
    'choices' => $dynamic_options,
));

Similar Posts