Wordpress

WordPress – change the default ‘from’ information

The default email address and from name in WordPress notification emails can be easily changed by editing your functions.php file

Simply add the following code (remembering to change the email address and name to the ones you want to use instead)

 add_filter('wp_mail_from', 'new_mail_from');
 add_filter('wp_mail_from_name', 'new_mail_from_name');

function new_mail_from($old) {
 return 'yourname@yourdomain.com';
 }
 function new_mail_from_name($old) {
 return 'Your Name';
 }

We’re based in Sheffield, UK. If you’d like help updating your WordPress site or any other WordPress maintenance, give us a call on 0114 383 0711

WordPress – Contact Form 7 with CAPTCHA

WordPress contact form with CAPTCHA integration instructions

How to install Contact Form 7 with a CAPTCHA in WordPress

  1. Install and activate the following plugins:
    1. Contact Form 7
    2. Really Simple Captcha
    3. Insert Headers and Footers
  2. From within your WORDPRESS dashboard, go to CONTACT > INTEGRATION
  3. Open a new tab in your browser and go to the Google reCAPTCHA site
    1. Follow the instructions to register your domain and generate the site and secret keys
    2. Copy the ‘site key’ and ‘secret key’ from the Google site to the Really Simple Captcha integration page before saving
  4. From within your WORDPRESS dashboard, go to SETTINGS > INSERT HEADERS AND FOOTERS
    1. Paste the script link below into the ‘header’ section then save changes
  5. From within your WORDPRESS dashboard, go to CONTACT > CONTACT FORMS
    1. Create a new contact form
    2. Right before the ‘SEND’ button of your form, paste the code below (don’t forget to add your unique SITE KEY where specified)
    3. Configure the form fully and save changes
  6. Create your contact page
    1. Integrate the contact form as normal

(step 4.1) Paste the following code into the header section

<script src='https://www.google.com/recaptcha/api.js'></script>

 

(step 5.2) Paste the following code into your new form just before the ‘send’ button (don’t forget to add your unique ‘site key’)

<div class="g-recaptcha" data-sitekey="<<your unique 'site key'>>"></div>