Saving an upload media meta box field

use these: $imgurl = isset( $values[‘upload_image’] ) ? esc_attr( $values[‘upload_image’][0] ) : ”; <input id=”upload_image” type=”text” size=”36″ name=”upload_image” value=”<?php echo $imgurl; ?>” /> <input id=”upload_image_button” type=”button” value=”Upload Image” /> if( isset( $_POST[‘upload_image’] ) ) update_post_meta( $post_id, ‘upload_image’, wp_kses_data( $_POST[‘upload_image’] ) );

add a “list” into add meta box : problem

You are missing the declaration of the HTML select tag which options are his children so just add something like this: function myplugin_inner_custom_box() { // Use nonce for verification wp_nonce_field( plugin_basename( __FILE__ ), ‘myplugin_noncename’ ); // The actual fields for data entry echo ‘<label for=”myplugin_new_field”>’; _e(“Description for this field”, ‘myplugin_textdomain’ ); echo ‘</label> ‘; echo … Read more

Custom select box meta field

To save post meta fields from custom meta boxes you need to hook into save_post with something like this: add_action( ‘save_post’, ‘myplugin_save_postdata’ ); There is some full example code on adding meta boxes on the codex Function Reference/add meta box