query.get_term_meta

/ Database / query.get_term_meta

Retrieves metadata for a term

Parameters supported : single, term_id, key

It returns: (mixed) If single is false, an array of metadata values. If single is true, a single metadata value

Syntax: [query.get_term_meta single=true term_id=”104″ key=”key_name” /]

where,

term_id (int) (Required) Term ID.

key: The meta key to retrieve. If no key is provided, fetches all metadata for the term.

single: (bool) (Optional) Whether to return a single value. If false, an array of all values matching the $term_id/$key pair will be returned. Default: false.

Example: [query.get_term_meta term_id=”104″ set=”module.term_val” /]

Categories
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *