wp-includes/comment-template.php
Place somewhere sensible before the submit button!
1 2 3 |
<input type="text" name="honeypot" style="display:none;"> |
root/wp-comments-post.php
at very top
1 2 3 4 5 6 7 8 9 |
if( !isset($_POST['honeypot'])) { die("No Direct Access"); } // Make sure the form has actually been submitted $spam = $_POST['honeypot']; // This is our Honeypot field if($spam) { // If the Honeypot field has been filled in die("No spamming allowed "); } else |