$_POST['field'], 'view'=>sanitize_text_field( $_POST['aworder_view'] )); $menuIcon = $_POST['icon']; // Update the meta field. update_post_meta( $post_id, '_view', $mydata ); update_post_meta($post_id, '_menu_icon', $menuIcon); } public function render_meta_box_content( $post ) { // Add an nonce field so we can check for it later. wp_nonce_field( 'aworder_inner_custom_box', 'aworder_inner_custom_box_nonce' ); // Use get_post_meta to retrieve an existing value from the database. $value = get_post_meta( $post->ID, '_view', true); $icon = get_post_meta( $post->ID, '_menu_icon', true); //$metafields = get_post_meta( $post->ID, '_view' ); echo ' ';/**/ echo ''; } }