Theme Customizer API Live Preview

I know this is an older post, but in case you’re still looking for the answer: Add this line to your tcx_register_theme_customizer function: $wp_customize->get_setting( ‘tcx_notification_text’ )->transport=”postMessage”; This gets the value from the field and passes it along to the Javascript to put into the live preview.

How to disable wordpress from overload my stylesheet styles with customizer styles

I’m not familiar with the customizer specifically, but if it does it’s style inclusion properly (via wp_enqueue_style), then you can do something like the following in a plugin: function remove_or_reorganize_styles() { if ( wp_style_is(‘target-style-handle’, ‘enqueued’ ) ) { wp_dequeue_style( ‘target-style-handle’ ); } } add_action(‘wp_enqueue_scripts’, ‘remove_or_reorganize_styles’, 99); This assumes that target-style-handle is the handle used to … Read more

Customizer Settings in Arrays

The get_theme_mod() function works the following: It fetches the get_theme_mods() function under the hood. This returns the following data $theme_slug = get_option( ‘stylesheet’ ); get_option( “theme_mods_{$theme_slug}” ); So in case you upgrade, write an upgrade function specific for that version of your plugin or theme, that uses one of the following, where the name is … Read more