WordPress at a glance

delete_term_meta() WP 1.0

Removes metadata matching criteria from a term.

Works based on: delete_metadata()

No Hooks.


true/false. True on success, false on failure.


delete_term_meta( $term_id, $meta_key, $meta_value );
$term_id(int) (required)
Term ID.
$meta_key(string) (required)
Metadata name.
Metadata value. If provided, rows will only be removed that match the value.
Default: ''

Code of delete_term_meta: wp-includes/taxonomy.php VER 4.9.8

function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {
	// Bail if term meta table is not installed.
	if ( get_option( 'db_version' ) < 34370 ) {
		return false;

	$deleted = delete_metadata( 'term', $term_id, $meta_key, $meta_value );

	// Bust term query cache.
	if ( $deleted ) {
		wp_cache_set( 'last_changed', microtime(), 'terms' );

	return $deleted;

Related Functions

From tag: Metadatas (any)

No comments
    Hello, !     Log In . Register