get_theme_mod not pulling css colors into header using wp_head
I answered my own question. I had the defaults set in the customizer settings, but not in the get_theme_mod() function.
I answered my own question. I had the defaults set in the customizer settings, but not in the get_theme_mod() function.
Save customizer default values to DB on theme activation
Reread your question and revised the solution as well. It is a Page template now and should be set to the page that needs its content protected. It relies on a “login” post that has the html from. <?php /* Template Name: Protected Page */ // Standard HTML of Theme global $post; // check if … Read more
So far the only solution I’ve come up with is creating a function that postMessages the event into the iframe (using customize_controls_enqueue_scripts hook). As for the receiver in iframe (hooked on customize_preview_init hook) I think it could still need some optimization because I’m getting a weird issue with window.addEventListener(‘message’,* getting some duplicate on customizer loading.. … Read more
How to tell theme customizer to save setting in my option table?
Disabling and enabling content using Customizer
Please add “;” after $i = $i++ and see if that fixes your issue foreach ($socialIcons as $icon) { $i = $i++; $wp_customize->add_setting( ‘pxk_href_’ . $icon[‘name’], // use this in twig file call to theme_mod array( ‘default’ => ”, ‘transport’ => ‘postMessage’, ‘priority’ => $i ) );
Problem with customizer setting with $id containing ‘widget’
It seems that the problem was that I was adding the function to ‘init’ and where the preview was not updated. Adding it to wp_enqueue_script solved my issue. Changed add_action(‘init’, ‘autoCompileLess’); to add_action(‘wp_enqueue_scripts’, ‘autoCompileLess’);
Coming back to this thread after five years as it’s still wasn’t marked as answered. Milo in the comments pointed out the answer: Trying to avoid including wp-load.php