Hi, I'm trying to change the contact form recipient to someone other than the WP admin. I assume it's in this code of homepage-contactUs.php, but any changes I make to hard code another email address don't seem to work. Can you assist? I was trying to hardcode '$emailTo' if (!isset($hasError)) { $emailTo = get_option('tz_email'); if (!isset($emailTo) || ($emailTo == '')) { $emailTo = get_option('admin_email'); } $subject = 'Grit Venture Partners Contact Form ' . $name; $body = __('Name:', 'one-page') . $name . "<br/>" . __('Email:', 'one-page') . $email . "<br/>" . __('Message:', 'one-page') . $msg; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $headers .= __('From:', 'one-page') . $name . ' <' . $emailTo . '>' . "\r\n" . __('Reply-To:', 'one-page') . $email; wp_mail($emailTo, $subject, $body, $headers); $emailSent = true; }
Hello, You are at the correct location if you want to change the email ID from source code. But, I would like to inform you that, the recipient email is the WordPress admin email, that you can alter from Dashboard->Settings->General options. If you still want to use the above code then, you need to do a small change, All you need to do is just replace wp_mail() line with the below one in above code. Code: wp_mail('[email protected]', $subject, $body); This will help you to figure it out and resolve the issue(s). Warm Regards! Naveen Kolhe InkThemes.com