Dropzonejs with WPCF7 [closed]
Dropzonejs with WPCF7 [closed]
Dropzonejs with WPCF7 [closed]
Admin wp_ajax hook returning 0
Have you considered Protocol Rewriting? The code below will convert all http: and https: to // for each script, link, base, and image. Place this in your functions.php: add_action( ‘plugins_loaded’, ‘wpse_232287_init’ ); function wpse_232287_init() { // Initiate the function ob_start( ‘wpse_232287_remove_http’ ); } function wpse_232287_remove_http( $buffer ) { // Check for a Content-Type header, only … Read more
The reason for the media uploader not opening when clicking the second button is that both of your buttons have the same ID, which you are also binding to the function that open your uploader. Element IDs should always be unique, hence the .click function listener will only detect when user clicks the first button … Read more
After a few days reading about srcset attribute (Thanks Benoti for point to this!), definitely, I can see that this is the right way. This solution is simple, enough to solve this question, although srcset attribute with <picture> tag is much more powerfull. My solution: Declare sizes in functions.php add_image_size( ‘c200x200’, 200, 200, true ); … Read more
Gravity list field override and adding javascript [closed]
Not the best way but removing the default WordPress actions that allow any scripts in the document’s head can help: function md_footer_enqueue_scripts() { remove_action(‘wp_head’, ‘wp_print_scripts’); remove_action(‘wp_head’, ‘wp_print_head_scripts’, 9); remove_action(‘wp_head’, ‘wp_enqueue_scripts’, 1); } add_action(‘wp_enqueue_scripts’, ‘md_footer_enqueue_scripts’);`
How to add unique image class to WordPress
Auto Load New Posts
Apologies for the delay – what I did was basically created a .js file and places it within my theme folder – for example themes/nameoftheme/custom/checkcode.js Then using jquery – I created my code – here’s a snippet: jQuery(‘#in-category-6’).click(function(){ jQuery(‘#metabox_one’).toggle(this.checked); jQuery(‘#metabox_two’).hide(); jQuery(‘#metabox_three’).hide(); jQuery(‘#in-category-3’).attr(‘checked’, this.checked); jQuery(‘#in-category-1’).attr(‘checked’, false); jQuery(‘#in-category-4’).attr(‘checked’, false); jQuery(‘#in-category-5’).attr(‘checked’, false); jQuery(‘#in-category-7’).attr(‘checked’, false); jQuery(‘#in-category-8’).attr(‘checked’, false); jQuery(‘#in-category-9’).attr(‘checked’, false) … Read more