Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save gabrielstuff/4726410 to your computer and use it in GitHub Desktop.

Select an option

Save gabrielstuff/4726410 to your computer and use it in GitHub Desktop.
Prevent bad robot cat spamer from using your amazing contact form

#Akismet is great and you already should use it.

Well, guess what you didn't and you have lots of contact for on this latest website. Use this simple sql query to replace and add akismet support to your contact form :

update wp_postmeta set meta_value = replace(meta_value,
'[text* your-name]',
'[text* your-name akismet:author]');
update wp_posts set post_content = replace(post_content,
'[text* your-name]',
'[text* your-name akismet:author]');

update wp_postmeta set meta_value = replace(meta_value,
'[email* your-email]',
'[email* your-email akismet:author_email]');
update wp_posts set post_content = replace(post_content,
'[email* your-email]',
'[email* your-email akismet:author_email]');

That way you will use the akismet API for checking against spammer robot. See more information here : http://contactform7.com/spam-filtering-with-akismet/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment