Summery Summery

Registers a meta key for terms.

Syntax Syntax

register_term_meta( string $taxonomy, string $meta_key, array $args )

Parameters Parameters


(Required) Taxonomy to register a meta key for. Pass an empty string to register the meta key across all existing taxonomies.


(Required) The meta key to register.


(Required) Data used to describe the meta key when registered. See register_meta() for a list of supported arguments.

Return Return

(bool) True if the meta key was successfully registered, false if not.

Source Source

File: wp-includes/taxonomy.php

 * Updates metadata cache for list of term IDs.
 * Performs SQL query to retrieve all metadata for the terms matching `$term_ids` and stores them in the cache.
 * Subsequent calls to `get_term_meta()` will not need to query the database.


Changelog Changelog

Version Description
4.9.8 Introduced.


Leave a Reply