Spam filtering with Akismet
— Secure forms on your website using Akismet
Activating Akismet
The first step is to activate the Akismet plugin. Since the plugin package of Akismet is bundled with Popeye, there is no need to manually install it. Move to the Plugins menu and simply activate the plugin titled Akismet Anti-Spam.
- Go to https://domainname.be/wp-admin/plugins.php Example: https://popeye.be/wp-admin/plugins.php
- Plugins -> Akismet Anti-Spam -> activate
- Settings -> fill in the API key
- Save
Deploying Akismet in a contact form
To use Akismet to protect your contact form, you need to give specific options to input fields (form-tags).
- Go to the contact form in the backend -> edit
akismet:author
You give this option to the field where submitters input their names.
Example: [text* your-name akismet:author]
akismet:author_email
You give this option to the field where submitters input their email addresses.
Example: [email* your-email akismet:author_email]
Testing the spam filtering
To test if the spam filtering is working correctly, try inputting “viagra-test-123” into the name (akismet:author) field or “akismet-guaranteed-spam@example.com” into the email (akismet:author_email) field, and submitting the form. With these magic words reserved for testing, Akismet must return a “spam” response. If it is working as expected, you’ll see an orange-bordered error message.