How to create Customizer Live Preview
How to create Customizer Live Preview
Edit transport type
// wpsf color picker
array(
'name' => 'wpsf_color_picker',
'default' => '#3498db',
'transport' => 'postMessage', // Default Transport type for each setting is refresh, however, if you want to create live preview customization you can change it to 'postMessage'. Take a look at the example, we added trasport type to the color picker control.
'control' => array(
'type' => 'wpsf_field',
'options' => array(
'type' => 'color_picker',
'title' => 'Color Picker Field',
),
),
),Preparing Customizer Javascript
Enqueue the Script
Last updated