title: update custom post meta from front end form
body: <p>This is how i am getting custom post meta within query.</p>
  
  <pre><code>&lt;?php 
          $collections = get_post_meta( $post-&gt;ID, 'do_collection');
          if( !$collections || !$collections[0] )
              return;
              foreach ( $collections[0] as $collection ) :
              echo '&lt;p&gt;'.$collection['song-title'].'&lt;/p&gt;';
              echo '&lt;p&gt;'.$collection['song-category'].'&lt;/p&gt;';
              echo '&lt;p&gt;'.$collection['song-layrics'].'&lt;/p&gt;';
          endforeach;
  ?&gt;
  </code></pre>
  
  <p>Now i am trying to get custom post meta values from the form on frontend.
  but when i submit form from frontend i get all meta fields with a first alphabet in admin area.  </p>
  
  <pre><code>&lt;?php 
  if( 'POST' == $_SERVER['REQUEST_METHOD'] &amp;&amp; !empty( $_POST['action'] ) &amp;&amp;  $_POST['action'] == "new_post") {
  
      $new_post = array(
      'post_status'   =&gt;  'publish',
      'post_type' =&gt;  'do_songs'
      );
      $pid = wp_insert_post($new_post);
      update_post_meta($pid, 'do_collection',  $_POST['song-title']);
      update_post_meta($pid, 'do_collection',  $_POST['song-category']);
      update_post_meta($pid, 'do_collection',  $_POST['song-layrics']);
  
      $link = get_permalink( $pid );
      wp_redirect( $link );
  }
  do_action('wp_insert_post', 'wp_insert_post');
  ?&gt;
  
  &lt;div class="form-wrap"&gt;
  &lt;form id="new_post" name="new_post" method="post" action="" class="wpcf7-form" enctype="multipart/form-data"&gt;
      &lt;fieldset&gt;
          &lt;label for="song-title"&gt;Song Title:&lt;/label&gt;
          &lt;input type="text" value="" tabindex="35" name="song-title" id="song-title" /&gt;
      &lt;/fieldset&gt;
      &lt;fieldset&gt;
          &lt;label for="song-category"&gt;Song Category:&lt;/label&gt;
          &lt;input type="text" value="" tabindex="35" name="song-category" id="song-category" /&gt;
      &lt;/fieldset&gt;
      &lt;fieldset&gt;
          &lt;label for="song-layrics"&gt;Song Layrics:&lt;/label&gt;
          &lt;input type="text" value="" tabindex="35" name="song-layrics" id="song-layrics" /&gt;
      &lt;/fieldset&gt;
      &lt;fieldset class="submit"&gt;
          &lt;input type="submit" value="Post Review" tabindex="40" id="submit" name="submit" /&gt;
      &lt;/fieldset&gt;
      &lt;input type="hidden" name="action" value="new_post" /&gt;
      &lt;?php wp_nonce_field( 'new-post' ); ?&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>