Function: delete_post_meta_by_key

delete_post_meta_by_key( string $post_meta_key )

Deletes everything from post meta matching the given meta key.

Shortcut: dpmbk

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.


Name Type(s) Default Value Description
$post_meta_key string

Key to search for when deleting.



Whether the post meta key was deleted from the database.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.