I'm building theme from scratch. I want to add "Display Site Title and Tagline" checkbox bellow Site Title and Tagline
I can do that If I add the following code to functions.php
add_theme_support( 'custom-header' );
However if I add that code it automatically adds Header Image Option to customizer
How can I add "Display Site Title and Tagline" checkbox without having to display Header Image option in customizer?
What would be proper way of displaying "Display Site Title and Tagline" checkbox without Header Image Options?
I'm building theme from scratch. I want to add "Display Site Title and Tagline" checkbox bellow Site Title and Tagline
I can do that If I add the following code to functions.php
add_theme_support( 'custom-header' );
However if I add that code it automatically adds Header Image Option to customizer
How can I add "Display Site Title and Tagline" checkbox without having to display Header Image option in customizer?
What would be proper way of displaying "Display Site Title and Tagline" checkbox without Header Image Options?
You can do this by removing the control itself using:
function twentynineteen_customize_register( $wp_customize ) {
$wp_customize->remove_control('header_image');
}
add_action( 'customize_register', 'twentynineteen_customize_register' );
But note that this is not allowed in themes in wordpress as per the WordPress themes handbook guidelines.
If you are submitting the theme in wordpress then you have to add this manually following this documentation https://developer.wordpress/themes/customize-api/customizer-objects/