<div class="col-lg-7 col-md-6 col-xs-12">
<div class="contact-us-form">
<form action="#" method="post" class="form-validation" autocomplete="off">
<input type="email" placeholder="<?php esc_attr_e('Email Address*', 'gullu'); ?>" name="email">
<input type="text" placeholder="<?php esc_attr_e('Subject*', 'gullu'); ?>" name="sub">
<textarea placeholder="<?php esc_attr_e('Your Message*', 'gullu'); ?>" name="message"></textarea>
<button type="submit" name="contact_submit" class="p-bg-color hvr-trim-two"> <?php echo esc_html($btn_label); ?> </button>
</form>
<?php
if(isset($_POST['contact_submit'])) {
$to = function_exists('cs_get_option') ? cs_get_option('mail_to') : '';
$email = isset($_POST['email']) ? $_POST['email'] : '';
$sub = isset($_POST['sub']) ? $_POST['sub'] : '';
$message = isset($_POST['message']) ? $_POST['message'] : '';
$body = "<b>" . esc_html__("Email: ", "gullu") . "</b>" . $email . "<br>
<b>" . esc_html__("Subject: ", "gullu") . "</b>" . $sub . "<br>
<b>" . esc_html__("Message: ", "gullu") . "</b>" . $message . "<br>";
$headers = array("Content-Type: text/html; charset=UTF-8");
wp_mail($to, $sub, $body);
if (@wp_mail($to, $sub, $body, $headers)) {
echo "<br> <br>" . esc_html__("Your message has sent successfully", "gullu");
} else {
echo "<br> <br>" . esc_html__("An error occurred. Please fill the form again and submit.", "gullu");
}
}
?>
</div> <!-- /.contact-us-form -->
</div> <!-- /.col- -->
не работает форма, купил тему, может что то не так делаю, нужно подключать на ворпресс?