Forum Replies Created

Viewing 1 replies (of 1 total)
  • Well, an effective measure would be blocking the IP from which they are leaving all those comments. Each comment has associated with it an IP address, and you can copy/paste that into this function, and then put this function into your themes functions.php file.

    $allowed_ips = array(COMMA SEPARATED LIST OF IP's i.e. '123.12.123.12', 123.12.321.12');
    
    $ip=$_SERVER['REMOTE_ADDR'];
    
    if(!in_array($ip, $allowed_ips)) wp_die('Are you a spammer? Then no soup for you!');

    Some people will complain that an IP blacklist is overkill, and you’ll block people that you don’t mean to, but this is just a quick example. Maybe I’ll throw together a plugin.

Viewing 1 replies (of 1 total)