How to change the customizer´s sidebar width?

Enqueue a style sheet to your admin or dashboard with admin_enqueue_scripts hook like below- add_action( ‘admin_enqueue_scripts’, ‘the_dramatist_admin_styles’ ); function the_dramatist_admin_styles() { wp_enqueue_style( ‘admin-css-override’, get_template_directory_uri() . ‘/your-admin-css-file.css’, false ); } And put your admin css code there. As your code above the inside of your-admin-css-file.css will look kinda like- .wp-full-overlay.expanded { margin-left: 500px !important; } #customize-controls.wp-full-overlay-sidebar … Read more

Using the child theme functions.php to change the customizer.php on parent theme

Put this code in function.php. create custom section in customizer for logo : <?php add_action(‘customize_register’, ‘theme_footer_customizer’); function theme_footer_customizer($wp_customize){ //adding section in wordpress customizer $wp_customize->add_section(‘footer_settings_section’, array( ‘title’ => ‘Footer Text Section’ )); //adding setting for footer logo $wp_customize->add_setting(‘footer_logo’); $wp_customize->add_control(new WP_Customize_Upload_Control($wp_customize,’footer_logo’,array( ‘label’ => ‘Footer Logo’, ‘section’ => ‘footer_settings_section’, ‘settings’ => ‘footer_logo’, ))); }

trigger(‘change’) not working

To use a custom control, you need a field with special attributes to be linked to the “publish” button. if you don’t want to display this field, you can generate a hidden field like that : class WP_Test_2_Customize_Control extends WP_Customize_Control { public function render_content() { ?> <input id=”<?php echo htmlspecialchars(“_customize-input-{$this->id}”);?>” type=”hidden” <?php $this->input_attrs();?> <?php if … Read more

With WP 3.4 customizer, while using postMessage & working within your JS for one option, can you retrieve current value for another option?

What you could do is the following : // ———————————————————- // Primary Typograpy // ———————————————————- var current; /* Primary Typography – Size */ wp.customize(‘typography_primary_size’, function( value ) { current.size = value; value.bind(function(size) { $(‘h1, h2, h2, h4, h5, h6’).css(‘font-size’, size); }); }); /* Primary Typography – Face */ wp.customize(‘typography_primary_face’, function( value ) { current.face = … Read more

Modify Javascript Configuration Options for Theme Customizer Colour Picker

The color picker thing is registered as a jQuery UI widget, so you could modify its prototype object before the widget is used in the page: add_action(‘customize_controls_print_footer_scripts’, function(){ ?> <script> jQuery(document).ready(function($){ $.wp.wpColorPicker.prototype.options = { border: false, // other options here… }; }); </script> <?php }); (You should put that in your .js file)