$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>theme customizer - "Display Site Title and Tagline" checkbox without adding Header Image option|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

theme customizer - "Display Site Title and Tagline" checkbox without adding Header Image option

matteradmin9PV0评论

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?

Share Improve this question asked Jan 16, 2019 at 17:25 Dejan GavrilovicDejan Gavrilovic 465 bronze badges 1
  • Related: wordpress.stackexchange/questions/275370/… – Jesse Nickles Commented Oct 27, 2022 at 23:18
Add a comment  | 

1 Answer 1

Reset to default 0

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/

Post a comment

comment list (0)

  1. No comments so far