Friday 29 December 2017

Contact Form 7 Data POST


How to pass/post Contact Form 7 Data another storage or API?

Download  Contact Form 7 Data POST Plugin and write your custom code in plugin file then you can pass data easily...🌝


Monday 25 September 2017

Uncaught Error: Syntax error, unrecognized expression: [href=#] in ordpress




To temporarily solution
Until your theme developers release a fixed version,
you can add the following code snippet into your theme functions.php file

------------------------------------------------------------------------------------

add_action( 'wp_enqueue_scripts', 'load_old_jquery', 100 );
function load_old_jquery() {
if ( ! is_admin() ) {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', ( "//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" ), false, '1.11.3' );
wp_enqueue_script( 'jquery' );
}
}

Saturday 9 September 2017

Add Overlay on Contact Form 7 Submit Button

=> Add below script in Wordpress Footer

<script type="text/javascript">
jQuery(document).ready(function (){
// Contact Form 7 Submit Button Overlay
var OriginalSubmitValue;
jQuery('.wpcf7-submit').on('click', function () {
OriginalSubmitValue = jQuery(this).val();
jQuery(this).val('Processing ...');
/*setTimeout(function(){jQuery('.wpcf7-submit').attr('disabled','disabled');},1000);*/
jQuery("body").after('<div id="quoteformloadingscreen" style="background: rgba(0, 0, 0, 0.4);position: fixed;top: 0;left: 0;z-index: 999999;width: 100%;height: 100%;overflow-y: hidden;overflow: hidden;"></div>');
});

// Hide new spinner on result
jQuery('div.wpcf7').on('wpcf7:invalid wpcf7:spam wpcf7:mailsent wpcf7:mailfailed', function () {
//jQuery('.ajax-loader-custom').css({ visibility: 'hidden' });
//jQuery('.wpcf7-submit').prop('disabled', false);
jQuery('.wpcf7-submit').val(OriginalSubmitValue);
jQuery("#quoteformloadingscreen").remove();
});
});
</script>

Friday 25 August 2017

Display spinner with jQuery-ui autocomplete

Add below Class CSS in Your CSS style with loading.gif image

.ui-autocomplete-loading{
background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-2CAHF5Z8aPGaK1rsXDzE773kXI9aMrtoTK865ZzNo7VHuhrHJevNyh-dmcMVEDXdB_nMdMlkK1EokWTsbgQgmN7ToHUmWfN3B_JlxIlG5KPPxk5eADuQxyXbMrLSpgivPAzMwNu6l84/s320/loading.gif') no-repeat right center !important;
}



Wednesday 9 August 2017

Gravity Form In Prevent duplicate form submit on back button

jQuery(function($){
       $(document).on('gform_post_render', function(e, form_id){
            $('#gform_ajax_frame_'+form_id).attr('src', 'about:blank');
       });
});

Friday 12 May 2017

Featured Image Get in Wordpress

<?php
if(is_home()){
   $blog_page = get_option( 'page_for_posts' );
   $src = wp_get_attachment_image_src( get_post_thumbnail_id($blog_page), 'full' );
$Featured_Image = 'style="background-image: url('.$src[0].');"';
}
?>
<div class="" <?php echo $Featured_Image; ?>></div>

Tuesday 3 January 2017

WooCommerce: Add wordpress custom field Tab on the Product Page

<?php

/* ## WooCommerce: Add wordpress custom field Tab on the Product Page ## */

/*--------------- Add belove code in theme's function.php file --------------*/



/* Add custom field description tab in Product page */

add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' );

function woo_new_product_tab( $tabs ) {
   
$tabs['product_short_description'] = array(
    'title'     => __( 'Ingredients', 'woocommerce' ),
    'priority'  => 50,
    'callback'  => 'woo_new_product_tab_content'
);
    return $tabs;
}


function woo_new_product_tab_content() {
echo get_post_meta(get_the_ID(), 'custom_field_name', TRUE); // Add here custom field name
}

/*. Add custom field description tab in Product page */
?>