ajax delete value from custom field array
Try this: function delete_attachment() { $id = $_POST[‘att_ID’]; // the attachment ID // Deletes the attachment (and all of its custom fields or meta data; e.g. // `photo_order`). The `true` bypasses the trash. $att = wp_delete_attachment( $id, true ); // Deletes all custom fields named `vid_pix` where the value (`meta_value`) // is the attachment ID … Read more