adding checkbox to theme customizer

I was able to solve this. Here is the code that got the checkbox working. function theme_customizer_register_checkbox($wp_customize) { $wp_customize->add_section( ‘global_options’, array( ‘title’ => ‘Global Options’, ) ); $wp_customize->add_setting( ‘show_supporters’, array( ‘default’ => true, ‘transport’ => ‘postMessage’ ) ); $wp_customize->add_control( ‘show_supporters’, array( ‘section’ => ‘global_options’, ‘label’ => ‘Show supporters section?’, ‘type’ => ‘checkbox’ ) ); } … Read more

add_theme_support(‘custom-header’) does not add the option to customize

From the array above, I think you just left out “uploads”. And if you’re wanting to be able to upload headers in the admin panel, it’s good to include the “width” and “height” in the array as well. $chargs = array( ‘width’ => 980, ‘height’ => 60, ‘default-text-color’ => ”, ‘default-image’ => ”, ‘uploads’ => … Read more

Change the location of add_theme_support( ‘custom-header’ ) in the customizer

This is kind of a hacky way to accomplish this but digging around core reveals that the default section name is header_image: https://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/class-wp-customize-control.php#L734 So if we name the section we want it added to as header_image, the custom-header settings will automatically apply to that section. For example: $wp_customize->add_panel( ‘example_panel’, array( ‘priority’ => 10, ‘capability’ => … Read more

What is the name of the setting in the customizer for ‘Display Site Title and Tagline’ checkbox?

Looks like the answer is display_header_text(). I found it in customizer.php in the twentysixteen theme. Relevant code: /** * Styles the header text displayed on the site. * * Create your own twentysixteen_header_style() function to override in a child theme. * * @since Twenty Sixteen 1.0 * * @see twentysixteen_custom_header_and_background(). */ function twentysixteen_header_style() { // … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)