Sorting widget control

I found that scripts for widget only work when included inline in the php file. Note: An external Js file might work for other dog elements outside the customizer area, but it is impossible to reference the dom elements in the customizer area.

How to add a do_action on refreshing of WP customizer?

Got the solution: Create a PHP file “purge-bb-cache.php” Create a JS script like below in functions.php purge-bb-cache.php <?php FLBuilderModel::delete_asset_cache_for_all_posts(); ?> JS script: // Add JS to customizer function print_customizer_js() { ?> <script> // Purge BB Cache On Save Customizer jQuery(document).ready(function(){ jQuery(“input#save”).click(function(){ //var ajaxurl = “<?php echo ( get_stylesheet_directory() . ‘/wp-content/themes/bb-theme-child/script.php’ ); ?>”; jQuery.ajax({ type: ‘POST’, … Read more

How to change the order of Jquery in the footer of my theme?

Understand wp_enqueue’s dependencies parameter You need to ensure the other script depends on jQuery being ready before it loads. Checking the wp_enqueue usage example: <?php wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); ?> It is $deps (dependencies) that we can utilise for this purpose. Properly enqueue the second script, and leverage that parameter Secondly you … Read more