title: Wordpress Contact Form Subject Woes
body: <p>One of the problems I was experiencing with my last site was the Contact Form - it uses a static subject approach.. which is fine - but the problem is if you use Gmail, then it will group emails of the same subject which isn't ideal, especially if you expect a lot of traffic that way.</p>
  
  <p>On the theme I'm using there's a Subject field, but it doesn't seem to be utilized at all. When I sent my test message, I received:</p>
  
  <p>EMAIL SUBJECT: .am - message from contact form</p>
  
  <p>Site: .am</p>
  
  <p>Name: Alex </p>
  
  <p>Email: test@test.tld</p>
  
  <p>Subject: .am - message from contact form</p>
  
  <p>Message: Test body.</p>
  
  <p>So whatever text I entered into the subject field was completely ignored, and then static text was pulled from the e-mail subject and repeated, again, in the body.</p>
  
  <p>I've located the code in the respective page (I think?). </p>
  
  <h2>APOLLO13.PHP</h2>
  
  <pre><code>if (empty($name))
  $name_error = true;
  if (empty($email) || !is_email($email))
  $email_error = true;
  if (empty($subject))
  $subject_error = true;
  if (empty($content))
  $content_error = true;
  if ($name_error == false &amp;&amp; $email_error == false &amp;&amp; $content_error == false &amp;&amp;     $subject_error == false) {
  $subject = $site . __(' - message from contact form', TPL_SLUG);
  $body = __('Site: ', TPL_SLUG) . $site . "\n\n"
  . __('Name: ', TPL_SLUG) . $name . "\n\n"
  . __('Email: ', TPL_SLUG) . $email . "\n\n"
  . __('Subject: ', TPL_SLUG) . $subject . "\n\n"
  . __('Message: ', TPL_SLUG) . $content;
  $headers = "From: $name &lt;$email&gt;\r\n";
  $headers .= "Reply-To: $email\r\n";
  if (wp_mail($email_to, $subject, $body, $headers)) {
  $title_msg = __('Success sending form', TPL_SLUG);
  } else
  $title_msg = __('Something wrong. Try again!', TPL_SLUG);
  } else {
  $title_msg = __('Error in form', TPL_SLUG);
  if (!empty($name))
  $name_tag = 'value="' . $name . '"';
  if (!empty($email))
  $email_tag = 'value="' . $email . '"';
  if (!empty($subject))
  $phone_tag = 'value="' . $subject . '" title="' . __('General question ...', TPL_SLUG) . '"';
  if (!empty($content))
  $content_tag = $content;
  }
  </code></pre>
  
  <p>And what I want is, essentially</p>
  
  <p>EMAIL SUBJECT: $site | $subject-user-entered</p>
  
  <p>Name:</p>
  
  <p>Email:</p>
  
  <p>Message:</p>
  
  <p>How would I go about amending the code to do that? Because this:</p>
  
  <pre><code>$subject = $site . __(' - message from contact form', TPL_SLUG);
  . __('Subject: ', TPL_SLUG) . $subject . "\n\n"
  </code></pre>
  
  <p>Seems a little pointless.</p>
  
  <h2>EDIT</h2>
  
  <p>I've found the code for the form itself if that's of any help:</p>
  
  <pre><code>&lt;form action="http&lt;?php echo $ssss ?&gt;://&lt;?php echo $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"] ?&gt;"
        method="post" id="contact-form-&lt;?php echo $form_iter ?&gt;" class="contact-form styled-form"&gt;
      &lt;div class="submit_inputs"&gt;
          &lt;div&lt;?php echo ($name_error ? ' class="error"' : '') ?&gt;&gt;
              &lt;input id="apollo13-contact-name" name="apollo13-contact-name" type="text" value=""/&gt;
              &lt;label for="apollo13-contact-name"&gt;
                  &lt;?php echo __('Name', TPL_SLUG) ?&gt;
                  &lt;span&gt; (&lt;?php echo __('required', TPL_SLUG) ?&gt;)&lt;/span&gt;
              &lt;/label&gt;
          &lt;/div&gt;
          &lt;div style="clear: both;"&gt;&lt;/div&gt;
          &lt;div&lt;?php echo ($name_error ? ' class="error"' : '') ?&gt;&gt;
              &lt;input id="apollo13-contact-email" name="apollo13-contact-email" type="text" value="" class="email"/&gt;
              &lt;label for="apollo13-contact-email"&gt;
                  &lt;?php echo __('Email', TPL_SLUG) ?&gt;
                  &lt;span&gt; (&lt;?php echo __('required', TPL_SLUG) ?&gt;)&lt;/span&gt;
              &lt;/label&gt;
          &lt;/div&gt;
          &lt;div style="clear: both;"&gt;&lt;/div&gt;
          &lt;div&lt;?php echo ($name_error ? ' class="error"' : '') ?&gt;&gt;
              &lt;input class="placeholder" id="apollo13-contact-subject" name="apollo13-contact-subject" type="text"
                     value=""/&gt;
              &lt;label for="apollo13-contact-subject"&gt;
                  &lt;?php echo __('Subject', TPL_SLUG) ?&gt;
              &lt;/label&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div style="clear: both;"&gt;&lt;/div&gt;
      &lt;div&lt;?php echo ($name_error ? ' class="error"' : '') ?&gt;&gt;
          &lt;textarea id="apollo13-contact-content" name="apollo13-contact-content" rows="10" cols="40"&gt;&lt;/textarea&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;input type="hidden" name="apollo13-contact-form" value="send"/&gt;
          &lt;input id="contact-submit" type="submit" value="&lt;?php echo __('Submit form', TPL_SLUG) ?&gt;"/&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>