JavaScript stops working on selectively refreshed sections one inside the other
JavaScript stops working on selectively refreshed sections one inside the other
JavaScript stops working on selectively refreshed sections one inside the other
Disabling Customizer Selective Refresh shortcut icons for selected controls
Custom switch not hiding sub-fields on Customizer’s load
Customizer: active_callback and sanitize_callback incompatibility?
The customizer can not/will not track changes to more than one option. I am not sure why, but that is a definite design limitation. Most likely your widget code tries to update an option. In general, regardless of customizer, you should not do that. All of a widget settings should be limited to its on … Read more
Custom slider throwing an error
I haven’t clarified what is the best method to apply styles from the customizer. However, this is the function i am using right now (Not using the previous one anymore, therefore, you can remove the wp_add_inline_style part): // I like this way so much more that i’m going to cry. // Thanks to: // https://code.tutsplus.com/tutorials/settings-and-controls-for-a-color-scheme-in-the-theme-customizer–cms-21350 … Read more
You need to enqueue a separate script on a different action with a different dependency. /** * Enqueue styles and scripts for the Customizer pane. */ function mytheme_customize_pane_enqueue() { wp_enqueue_script( ‘mytheme-customizer-control’, get_template_directory_uri() . ‘/js/customizer-control.js’, array( ‘customize-controls’ ), ‘20180924’, true ); } add_action( ‘customize_controls_enqueue_scripts’, ‘mytheme_customize_pane_enqueue’ ); The JS looks like this: ( function( wp, $ ) … Read more
Child Theme disable customizer defaults
Try adding a filter instead. See this answer for more details add_filter(‘admin_menu’, ‘admin_menu_filter’,500); function admin_menu_filter(){ if (! is_admin()){ remove_submenu_page( ‘themes.php’, ‘background.php’); } } Also double check your link to the page from the admin menu. More details in the WordPress Codex To remove a settings page for plugins that use a slug like /wp-admin/options-general.php?page=certain-plugin-settings use … Read more