How to Add reCAPTCHA v3 in Contact Form 7

Поделиться
HTML-код
  • Опубликовано: 26 окт 2024

Комментарии • 37

  • @ilyas5khan
    @ilyas5khan Год назад

    Thanks for the video, It was helpful in implementing ReCaptcha v3 on my WordPress site.

    • @RankYa
      @RankYa  Год назад +1

      Glad it helped Ilyas

  • @putereadeaevolua
    @putereadeaevolua 2 года назад +1

    Thank you! Great tutorial.

    • @RankYa
      @RankYa  2 года назад +1

      You're welcome Cristian

  • @slamminx3
    @slamminx3 9 месяцев назад

    Thanks mate. Worked a treat ;)

    • @RankYa
      @RankYa  9 месяцев назад

      Glad it helped :-) while here, do keep in mind that #RankYa is a seasoned #WordPress optimization expert with many great how-to tutorials to get the best out of your WordPress website. Example: Contact Form 7 How to’s by RankYa
      www.rankya.com/wordpress/contact-form-7-how-to-by-rankya/

  • @nicothehousecat
    @nicothehousecat 2 года назад

    Excellent Work! Thank you.

    • @RankYa
      @RankYa  2 года назад

      Thank you too for the comment Daniel

  • @my-walks
    @my-walks 2 года назад

    Brilliant, thanks for this, It's made it so helpful to me.

  • @ahmedali-bu8ms
    @ahmedali-bu8ms 2 года назад

    thanks for the effort, very good information !

    • @RankYa
      @RankYa  2 года назад

      Glad it was helpful Ahmed

  • @louisesam-sin6062
    @louisesam-sin6062 3 года назад

    Thanks - very helpful 👍

    • @RankYa
      @RankYa  3 года назад

      Glad it was helpful!

  • @theflyingcamera
    @theflyingcamera 3 года назад

    Excellent tutorial, thanks for taking the time to do this!

    • @RankYa
      @RankYa  3 года назад

      Thanks James, I'm glad it was helpful!

  • @po1ntu
    @po1ntu 2 года назад

    Thank you

    • @RankYa
      @RankYa  2 года назад +1

      You're welcome

  • @fabricedeas9628
    @fabricedeas9628 3 года назад

    Thanks for this really great tutorial. It's very well explained and complete.

    • @RankYa
      @RankYa  3 года назад

      Good to hear Fabrice, make sure to check out the Mobile SEO for Contact Form 7 (very important for todays' Google world)

    • @fabricedeas9628
      @fabricedeas9628 3 года назад

      ​@@RankYa Thanks for this good advice. Even if i don't really understand its meaning. But, however, i'l going to check and search. By the way, in which country are you living ?

    • @fabricedeas9628
      @fabricedeas9628 3 года назад

      I have found your tutorial. There could not have been a simpler search. :)

  • @rhinotago
    @rhinotago 3 года назад

    Great video! Everything works perfectly. How would I change the functions and headers codes if I had contact forms on two pages?

    • @RankYa
      @RankYa  3 года назад

      Easy, you would change the Contact Form 7 to process on 2 different pages using WordPress conditional logic like so:

  • @marcinkonieczny8956
    @marcinkonieczny8956 Год назад

    Hi. I try add this solution to two pages, not one. I try with iDs, slugs but it is not work. Can you help me with it, please? Regards

    • @RankYa
      @RankYa  Год назад

      Best way to approach this Marcin would be to use a WordPress plugin which has a feature (using Yoast? They have it).

  • @musestudio7075
    @musestudio7075 2 года назад

    Thank you for this. Question: How do I use Recaptcha V.2 instead of V.3?? I already have the keys for both, but haven't been able to generate a form which shows the checkbox. I would like my visitors to see the recaptcha icon and checkbox.

    • @RankYa
      @RankYa  2 года назад

      All you have to do is follow the similar process by adding your secret keys, then, make sure that you insert
      *[recaptcha]*
      anywhere above the submit button when you edit your contact form, like so
      [recaptcha]
      [submit "Send"]
      Try the above method first, if not good, visit *Contact Form 7 How to’s by RankYa*
      www.rankya.com/wordpress/contact-form-7-how-to-by-rankya/
      And if still having issues adding reCAPTCHA to Contact Form 7 then comment using the comment form on RankYa blog and I'll assist you to get the reCAPTCHA (v2) Version 2 working :-)

  • @MBAinternetmktg
    @MBAinternetmktg 2 года назад

    I went through all the steps, but there is no reCaptcha below my Contact Form.

    • @RankYa
      @RankYa  2 года назад

      Hi Toni, this could be because of how Google recaptcha work (I know its rather silly but it does make sense that Google actually does NOT show the security feature when it knows that the visitor is legitimate (for example: when you login etc.))
      How to check? Either visit your site using incognito option OR just visit the site using proxy www.proxysite.com/
      IF Google reCAPTCHA v3 does NOT show, let us know and we'll find a solution

  • @panavpatel8623
    @panavpatel8623 2 года назад

    What would be the PHP code for multiple contact form page?
    I tried if( is_page('Page1') || ('Page2') ), but it didn't work

    • @RankYa
      @RankYa  2 года назад

      Then try using the Post ID of the page contact form is published on.
      if post ids were
      page1 = 24
      page2 = 65
      Then you would do
      if( is_page('24') || ('65') )
      this must work if the form is published under > Pages
      Please do let me know and I'll assist you to get it working :-)

  • @tanjimahmed213
    @tanjimahmed213 3 года назад

    thanks

    • @RankYa
      @RankYa  3 года назад +1

      You're welcome!

  • @creatorseo.official
    @creatorseo.official 2 года назад +1

    You don't need to add any the code to the theme. Follow this tutorial only until the integration dialog on Contact form 7 [Position 4:30 on the video] - the rest is unnecessary.

    • @RankYa
      @RankYa  2 года назад +2

      Thanks for the comment Clinton, and yes, for most WordPress setups you do NOT need to add any code to the Theme. However, since you can further optimize loading of Contact Form 7, those with skills should (if appropriate) modify the functions.php so that CSS and JS files aren't loaded on other pages (if contact form 7 is only on contact page) for example: URL named 'contact' and ONLY that page has contact form 7
      //code to put in functions.php (backup that file before making any changes)
      //get rid of scripts elsewhere
      add_action('wp_print_scripts', 'rankya_remove_js_scripts', 100000);
      add_action('wp_print_footer_scripts', 'rankya_remove_js_scripts', 100000);
      function rankya_remove_js_scripts() {
      if( !is_page('contact') ) {
      wp_deregister_script( 'contact-form-7' );
      wp_dequeue_script( 'contact-form-7' );
      wp_dequeue_script( 'wpcf7-recaptcha' );
      wp_deregister_script( 'wpcf7-recaptcha' );
      wp_dequeue_script( 'google-recaptcha' );
      wp_deregister_script( 'google-recaptcha' );
      }
      }
      //get rid of CSS elsewhere
      add_action('wp_print_styles', 'rankya_remove_styles', 100000);
      add_action('wp_print_footer_scripts', 'rankya_remove_styles', 100000);
      function rankya_remove_styles(){
      if( !is_page('contact') ) {
      wp_deregister_style('contact-form-7');
      wp_dequeue_style( 'contact-form-7' );
      }
      }
      //double make sure the JS is deferred
      add_filter( 'script_loader_tag', 'rankya_defer_scripts', 10, 3 );
      function rankya_defer_scripts( $tag, $handle, $src ) {
      $defer_these_scripts = array(
      'contact-form-7',
      'wpcf7-recaptcha',
      );
      if ( in_array( $handle, $defer_these_scripts ) ) {
      return '' . "
      ";
      }
      return $tag;
      }
      //These are RankYa optimization codes, hopefully will help RankYa followers using WordPress :-)

    • @creatorseo.official
      @creatorseo.official 2 года назад

      @@RankYa Thank you for your response and for your code. This makes good sense and I too will include the code that you kindly provided as this is indeed useful.

    • @RankYa
      @RankYa  2 года назад

      Great to hear Clinton