Delete a custom field value is a WordPress ability from Meta Box — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.
Install Free Plugin →Delete a custom field value
DestructivePermanently remove the stored value of a Meta Box custom field from an object.
Requires the Meta Box plugin on WordPress 6.9+ for the Abilities API (abilities are registered only when the wp_register_ability() function exists). The get, update, and delete abilities additionally require the target key to be a field Meta Box actually recognizes (verified via rwmb_get_field_settings) and the current user to hold the WordPress capability mapped from object_type: read_post/edit_post for posts, assign_term/edit_term for terms, read/edit_user for users, read/manage_options for settings pages, and read/moderate_comments for comments.
What it does
This ability removes a Meta Box custom field's stored value from an object by calling rwmb_delete_meta() with the given field_id, object_id and object_type. The removal is immediate and permanent — there's no undo — so it's marked as a destructive operation. As with the get and update abilities, the field must resolve to one Meta Box actually recognizes for that object before deletion is attempted. An AI assistant should confirm with the user exactly which field and object are being targeted before calling this, since deleting the wrong custom field could silently drop data like pricing, gallery references, or relationship links that other parts of the site depend on.
See it in action
You ask your AI assistant
"Delete the 'discount_code' custom field from post 128 — we don't need it stored there anymore."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| field_id | string | Yes | The custom field meta key. |
| object_id | integer|string | Yes | The object ID (post, term, user ID, or settings page slug). |
| object_type | string | No | The object type the field belongs to: post, term, user, setting, or comment. Defaults to post. |
Returns
An object with a single 'success' boolean confirming whether the field value was deleted.
Permission
The field_id must resolve to a field Meta Box actually recognizes for that object (checked via rwmb_get_field_settings). The current user must also hold the write-verb capability mapped from object_type: edit_post for posts, edit_term for terms, edit_user for users, manage_options for settings, or moderate_comments for comments.
More Meta Box abilities
Get a custom field value
Retrieve the stored value of a Meta Box custom field for a post, term, user, comment, or settings page.
Get expected value format for a field
Look up the expected value format and a worked example for a Meta Box field type, or for one specific field.
Update (or create) a custom field value
Set the value of a Meta Box custom field, creating it if it doesn't already exist yet.