I understand your concerns regarding reCAPTCHA and its impact on resource usage and Google PageSpeed results. To enable reCAPTCHA only on specific pages where it is needed, try the following can code to conditionally load and display reCAPTCHA on those pages.
Here is an example of how you can achieve this by adding custom code to your theme’s functions.php file:
function add_recaptcha_to_specific_pages() { if ( is_page( array( 'contact', 'contact-us' ) ) ) { // Replace 'contact' and 'contact-us' with the slugs or IDs of the pages where you want to enable reCAPTCHA // Add code to display reCAPTCHA here } } add_action( 'wp', 'add_recaptcha_to_specific_pages' );
In the code snippet above, we use the is_page()
function to check if the current page matches the specified page slugs or IDs. If it does, you can add the necessary code to display reCAPTCHA within the conditional statement.
Otherwise, I recommend reaching out to the Customer Success team. They will be able to provide you with more tailored guidance based on your specific setup.