admin管理员组文章数量:1023251
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.
<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>
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.
<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>
本文标签: formsHow to add or double field
版权声明:本文标题:forms - How to add or double field? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745588024a2157716.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论