首页 WordPress函数大全 get_the_terms()

get_the_terms()

2020-05-02 / 4388阅 / 悠然

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

get_the_terms( int|WP_Post $post, string $taxonomy )

Retrieve the terms of the taxonomy that are attached to the post.

描述

参数

$post

(int|WP_Post)
(Required)
Post ID or object.

$taxonomy

(string)
(Required)
Taxonomy name.

返回

(WP_Term[]|false|WP_Error) Array of WP_Term objects>WP_Error on failure.

大家谈论
    我的见解