0

Using this code in the console hides the setting as expected:

wp.customize.control('sub-footer-content-left').deactivate();

However using this in customizer-controls.js doesn't do anything:

/**
 * Scripts to alter the behavior of Customizer controls.
 */
 ( function ( $ ) {

     /**
        * Run function when customizer is ready.
        */
        wp.customize.bind('ready', function () {
            wp.customize.control('sub-footer-content-left').deactivate();
        });

 } ) (jQuery);

Enqueued to customize_controls_enqueue_scripts

Can anyone see where I'm going wrong?

Thanks

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.