Display custom_background outside wp_head()

custom_background() places the CSS to wp_head() as you mentioned so to get those CSS as if you don’t have wp_head() in your header, these tweaks from the core files would help: function wpse_228588_background_image_css() { $background_styles=””; if ( $bgcolor = get_background_color() ) $background_styles .= ‘background-color: #’ . $bgcolor . ‘;’; $background_image_thumb = get_background_image(); if ( $background_image_thumb … Read more

Is it possible to get a theme customizer setting from wp.customize using jquery?

Not sure what you try to accomplish, but you can get a value by key using the wp.customize object: wp.customize.value(‘show_on_front’)(); wp.customize.value(‘blogname’)(); …. sorry no jQuery here, just javascript, and yes, the extra () are intentional. Edit: Full overview of all settings: wp.customize._value; console.log(wp.customize._value); Edit II: different approach: a) lookup all available settings by using console.log(wp.customize._value); … Read more

add_action customize_register not working

You always need to be sure that three things are defined (section, setting and control). If you are adding a control to an already defined section, i.e. title_tagline, then you don’t need to re-register it, but always define the setting and the control. //adding setting for copyright text add_action(‘customize_register’, ‘theme_copyright_customizer’); function theme_copyright_customizer($wp_customize) { //adding section … Read more

Theme Customiser Image Control

The solution, needs a custom control object extending the original image control, and does an SQL query to grab the GUID and associated attachment ID on sanitisation. Not nice, kludgey, but it works $wp_customize->add_setting( ‘customimage’, array( ‘default’ => $default, ‘capability’ => ‘edit_theme_options’, ‘type’ => ‘option’, ‘sanitize_callback’ => array( ‘ICIT_Customize_Image_Control_AttID’, ‘attachment_guid_to_id’ ), ‘sanitize_js_callback’ => array( ‘ICIT_Customize_Image_Control_AttID’, … Read more

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