Customizer doesn't save changes in CSS
-
For example:
in customize.php$wp_customize->add_setting('element_show', array( 'transport' => 'postMessage' )); $wp_customize->add_control('element_show', array( 'type' => 'checkbox', 'label' => __('Hide element', 'wpt'), 'section' => 'general options', 'priority' => 1 ));in customize.js
wp.customize('element_show', function(value) { value.bind(function(to) { if('1' == to) { $('#element').css({ 'display': 'none' }); } else { $('#element').css({ 'display': 'block' }); } }); });I can see the changes in live preview, but When I refresh the page it doesn’t save the changes in CSS. Same goes for .addClass() and .removeClass().
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Customizer doesn't save changes in CSS’ is closed to new replies.