WordPress
October 15, 2021

Add Recaptcha in Custom Form in WordPress

You have to add recaptcha external js so use following function in your current themes functions.php file

Set Recaptcha element in your form.

//Custom Form




Put below js in your current themes custom.js file.

//Captcha validation script
jQuery(document).ready(function($) {
$(document).on(‘submit’,’.wc-captcha-form’,function(e){
if(grecaptcha.getResponse() == “”) {
e.preventDefault();
$(‘.captcha-error’).text(“Please verify captcha”);
} else {
$(‘.captcha-error’).text(“”);
}
});
});

Related Post


How to Change WordPress Post excerpt length

For Change post excerpt length add following code in your current themes functions.php file.

Set time Zone by Country

Include the following code file to your current themes functions.php file. Users can see all time by their country timezone wise.

How to Change the Order of Comment Form Fields in WordPress

If you want to put the comment field after all other fields are loaded. Add the following code in your current themes functions.php file.

How to Create Repeater Elements Using Visual Composer API

Learn how to create repeater fields for custom element of Visual Composer & WP Bakery. To achieve this, we need to write 2 functions. First one for create new element, Second one for add shortcode. function will be hooked to these specific action: vc_before_init The code Displaying Fields Values on the Frontend with shortcode. Visual […]

Prevent svg translation of fontawesome icon

Add Following script in head so use below code in your current themes header.php file. And also you have to add following script before your fontawesome css link.

how to Upload WordPress Custom Meta Box Image

Hi, here i implement multiple image upload custom fields (WordPress custom meta box image upload ) to page post type if you want it for another post type just change post type name. Add the following code to your current themes function.php file. Go to your pages from WordPress admin and check that multiple image […]


Leave a Reply

Your email address will not be published. Required fields are marked *