To prevent issues with SPAM on contact form page ad only made a few changes in the files "sidebar-contact.php" and "style.css" to replace the captcha fully employed by reCAPTCHA.
Please Wordpress Admin and click Edit Appearance:
Select the "sidebar-contact.php"and replace the code by origimal modified code below. Before you save you should put the keys "reCaptcha Public Key - $ publickey =" key and "Private Key reCaptcha - $ privatekey =" You can business users the same key business users in the admin ClassiPress "Security"
$ publickey = xxxxxxxxxxxxxxxxxxxxxxxxxx (substitute your key)
$ privatekey = xxxxxxxxxxxxxxxxxxxxxxxxxx (substitute your key)
// Get a key from http://recaptcha.net/api/getkey $publickey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $privatekey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
# was there a reCAPTCHA response? if ($_POST["submit"]) {
if ($response->is_valid) { cp_contact_ad_owner_email($post->ID); $msg = '<p class="green center"><strong>' . __('Your message has been sent!', 'appthemes') . '</p>'; } else {
# set the error code so that we can display it $msg = '<p class="red center"><strong>' . __('The anti-spam reCaptcha answer was incorrect!' , 'appthemes') . '</p>';
} }
?>
<form name="mainform" id="mainform" class="form_contact" action="#priceblock2" method="post" enctype="multipart/form-data"> <?php echo $msg; ?> <p class="contact_msg"><?php _e('To inquire about this ad listing, complete the form below to send a message to the ad poster.', 'appthemes') ?></p>
Please Wordpress Admin and click Edit Appearance:
Select the file "style.css" and locate the line within the code seuinte "/* reCaptcha styles */" and replace with the code below: