Wordpress Tips
Add a Hidden Honeypot Field to WordPress Login Forms
Those of you who have run a WordPress site for a while have probably noticed bots attacking your forms from time to time. Many malicious ones target login forms. You can always install a security plugin to handle them. Adding a honeypot field to your login forms is another way to catch and ban bots. Here is how to get it done:
The above code snippet simply adds a hidden field to your form, and when it is filled by a bot, they are blocked. You can use the same approach to protect your Contact Form 7 forms. Here is how:
To make sure your honeypot field stays hidden, simply hide it with CSS (display:none). You can take this to the next level by integrating it with a firewall plugin to block IPs automatically.
