Issues with dynamic widget in theme customizer
Issues with dynamic widget in theme customizer
Issues with dynamic widget in theme customizer
You need to use the partial refresh feature of kirki ‘transport’ => ‘postMessage’, ‘partial_refresh’ => array( ‘my_nav_render_setting’ => array( ‘selector’ => ‘.menu-button’, ‘render_callback’ => ‘my_nav_render’, ) ),
You have the value stored in the database in the cta_settings theme mod. If you want to rename your setting, then you’ll need to move the theme mod data you have stored in the database. For example: if ( get_theme_mod( ‘cta_settings’ ) ) { set_theme_mod( ‘phone_settings’, get_theme_mod( ‘cta_settings’ ) ); remove_theme_mod( ‘cta_settings’ ); }
I’ve solved the issue, it was because I called the class before creating it require_once ( dirname( __FILE__ ) . ‘/sections/contact.php’ ); require_once ( dirname( __FILE__ ) . ‘/controls/contact-form.php’ );
No, there is not a way to disable customize_changeset posts from being created. These customize_changeset posts are created with the auto-draft status in the same way that a post gets created with the auto-draft status whenever you click on “Add New” in the admin. Note that because the auto-draft status is used, any such posts … Read more
That’s how I solved the same problem. First you better create a child theme and within it create CPT. Add new page for displaying CPT and add this page in customizer. If someone has another simpler solution, please share!
So there’s 2 Customizer specific hooks depends on what exactly you’re trying to do. The customize_controls_enqueue_scripts is exactly like wp_enqueue_scripts but it enqueues in the control panel ( left side ) frame. I suggest requiring customize-controls scripts to make sure your script has access to them: function theme_customizer_control_scripts() { wp_enqueue_script( ‘scirpt-slug’, $scirpt_url, array( ‘jquery’, ‘customize-controls’ … Read more
I got the solution for this → function mytheme_customize_css() { ?> <style type=”text/css”> h1 { color: <?php get_option( ‘h1_typography’ ); ?>; } </style> <?php } add_action( ‘wp_head’, ‘mytheme_customize_css’); This above might not actually be needed. just put the css element that you want to be effected In the output array: ‘output’ => array( array( ‘element’ … Read more
You must use wp_nav_menu() if you want to get selective refresh (fast previewing). If you want to have a custom nav menu that uses selective refresh, then instead of manually iterating over wp_get_nav_menu_items() you instead need to subclass the Walker_Nav_Menu to implement your custom logic, and then pass it into wp_nav_menu() like this: wp_nav_menu( array( … Read more
The second argument for WP_Customize_Image_Control is the ID of the control. You’ve given the same id to both image controls, ‘Agmor Bootstrap’. Give them unique IDs and both should appear. Using the name of the setting is a simple option: new WP_Customize_Image_Control($wp_customize, ‘header_logo’, array( new WP_Customize_Image_Control($wp_customize, ‘header_background’, array(