Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

delete_post_meta()

3 tags 1 category

delete_post_meta() — Deletes a post meta field for the given post ID. You can match based on the key, or key and value. Removing based on key and value, will keep from removing duplicate metadata with the same key. It also allows removing all metadata matching the key, if needed. For historical reasons both the meta key and the meta value are expected to be “slashed” (slashes escaped) on input.

Inputs: $post_id (int): Post ID. $meta_key (string): Metadata name. $meta_value (mixed): Optional. Metadata value. If provided, rows will only be removed that match the value. Must be serializable if non-scalar. Default empty.

Returns bool: True on success, false on failure.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…