How to add options to the WordPress Customizer – Site Identity


The name of the section is title_tagline. If you paste the code below in functions.php file you will create a new option .

add_action( 'customize_register', 'custom_site_identity' );

function custom_site_identity( $wp_customize ) {
    $wp_customize->add_setting( 'description_1', array (
    'default' => '',		
    'sanitize_callback' => 'sanitize_text_field', ) );

    $wp_customize->add_control( new WP_Customize_Control( $wp_customize,  'description_1', array(
	'label'    => __( 'description_1', 'askiw' ),
	'section'  => 'title_tagline',
	'priority'    => 3,				
	'settings' => 'description_1',
	'type' => 'text',
    ) ) );
		
}

Leave a Reply