Customizer Selective Refresh doesn’t refresh properly with saved value
Customizer Selective Refresh doesn’t refresh properly with saved value
Customizer Selective Refresh doesn’t refresh properly with saved value
New customizer setting not showing value
You can see the customizer API to set default icon. This should do the trick, I guess: function mytheme_customize_register( $wp_customize ) { $wp_customize->add_setting( ‘site_icon’ , array( ‘default’ => get_bloginfo(‘template_url’) . ‘/images/logo.png’, ) ); } add_action( ‘customize_register’, ‘mytheme_customize_register’ );
With @Otto’s tips, i found the problem. I was calling theme settings in functions.php and was calling settings as global variable in theme files. This was working properly except temporary changes was disappearing in theme customizer’s live edit when you change page with clicking links. After this experience, what i am suggesting: If you have … Read more
Why exactly you want to represent it in RGBA where A means alpha channel (I guess) I mean, hex does not support transparency, so if you want to convert it to RGB, you just need to convert from hex to decimal r = parseInt(hex.substring(0,2), 16); g = parseInt(hex.substring(2,4), 16); b = parseInt(hex.substring(4,6), 16); result=”rgba(“+r+’,’+g+’,’+b+’,’+1+’)’; taken … Read more
The default controls are registered in WP_Customize_Manager::register_controls(), which is hooked to customize_register. This action is fired in another method, wp_loaded(), which is hooked to the action of the same name. To remove these default controls, use your own handler on customize_register with a later priority, so that it runs after register_controls() has added them: function … Read more
Yes, this is possible. Just add a callback to those mods that you want to appear on specific pages, like this: $wp_customize->add_control( ‘my_page_control’, array( … ‘active_callback’ => ‘is_page’, … )); You will see this control in the customizer only if you are viewing a page. Don’t forget to adapt the css produced by this mod … Read more
You can monkeypatch the wp.customize.previewer.query method: add_action( ‘customize_controls_enqueue_scripts’, function () { wp_add_inline_script( ‘customize-controls’, ‘(function ( api ) { api.bind( “ready”, function () { var _query = api.previewer.query; api.previewer.query = function () { var query = _query.call( this ); query.foo = “bar”; return query; }; }); })( wp.customize );’ ); }); This will ensure the script … Read more
The problem is probably in the way your fonts are being enqueued in the functions.php file of your theme. Look for instances of wp_register_style and see if you find the google fonts api there with http. It’s possible that your theme has its customizer settings in a different php file, so you should probably also … Read more
The selective refresh request doesn’t get the whole regular WordPress request context. That is why on initial load (regular request) it works, while on AJAX partial refresh it doesn’t. In your case, the global $authordata is not set and get_the_author_meta() is relying on it when no user is explicitly provided. You will need to do … Read more