Theme Customizer changes are dissappearing when change page
-
04-11-2019 - |
Question
An example option i am using:
// Layout
$wp_customize->add_setting( $themeslug.'_settings[layout]', array(
'default' => 'content-sidebar',
'type' => 'option',
'transport' => 'postMessage'
) );
$wp_customize->add_control( $themeslug.'_settings[layout]', array(
'label' => __( 'Layout', 'anatema' ),
'section' => 'secenek',
'type' => 'radio',
'choices' => array(
'content-sidebar' => __( 'Content - Sidebar', 'anatema' ),
'sidebar-content' => __( 'Sidebar - Content', 'anatema' ),
),
) );
$wp_customize->get_setting( $themeslug.'_settings[layout]' )->transport = 'postMessage';
My options are getting save when click save button. Changes are effecting properly on live preview with customizer.js but when i click a page in live preview, all un-saved changes are disappearing. How can i prevent that?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange