Function: unregister_post_meta

unregister_post_meta( string $post_type, string $meta_key )

Unregisters a meta key for posts.

Shortcut: upm

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.

Parameters

Name Type(s) Default Value Description
$post_type string

Post type the meta key is currently registered for. Pass an empty string if the meta key is registered across all existing post types.

$meta_key string

The meta key to unregister.

Returns

boolean

True on success, false if the meta key was not previously registered.

WordPress Developer Newsletter

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