首页 WordPress函数大全 get_term_meta()

get_term_meta()

2020-05-01 / 4112阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_term_meta( int $term_id, string $key = '', bool $single = false )

Retrieves metadata for a term.

描述

参数

$term_id

(int)
(Required)
Term ID.

$key

(string)
(Optional)
The meta key to retrieve. If no key is provided, fetches all metadata for the term.

Default value: ''

$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.

Default value: false

返回

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

大家谈论
    我的见解