I have been developing a plugin that creates a custom post type. The custom post type has many custom fields and I want to set default some values for these custom fields on activation.
How can I do this?
<li>
<label for="cx_number" class="sinop">Post Limit</label>
<input style="width:50px;" type="number" name="cx_number" id="cx_number" value="<?php if( !empty ( $postData['cx_number']) ) echo $postData['cx_number'][0]; ?>"/>
if ( isset( $_POST[ 'cx_number' ] ) ) {
update_post_meta( $post_id, 'cx_number', $_POST[ 'cx_number' ] ) ;
}