How to add or double field?

by jowan   Last Updated April 15, 2019 09:08 AM

I want to add one more field like this, I copied and paste this code. It's gave me one more field, but when I edit first field and publish my post, second field is gating same inserted. enter image description here

<div class="Blkcn TrailerBx"> 
    <label> 
        <span class="Title"><?php _e('Trailer', TRMOVIES); ?><i class="dashicons dashicons-format-video"></i></span> 
        <textarea class="txtara" name="trailer" placeholder="<?php _e('Insert code iframe here', TRMOVIES); ?>">
            <?php 
            if( isset( $_POST['trailer'] ) and empty($ok) ) { 
                echo stripslashes( $_POST['trailer'] ); 
            }
            elseif( get_post_meta($post->ID, TR_MOVIES_FIELD_TRAILER, true)!='' ) {
                echo stripslashes( get_post_meta($post->ID, TR_MOVIES_FIELD_TRAILER, true) ); 
            } ?>
        </textarea> 
    </label> 
</div>
Tags : forms


Related Questions


Updated September 27, 2017 23:08 PM

Updated March 17, 2017 15:08 PM

Updated July 06, 2015 13:03 PM

Updated February 26, 2016 01:03 AM

Updated March 13, 2017 16:08 PM