›wp_get_post_terms ($post_id = 0,$taxonomy = 'post_tag',$args = array()) Parameters: (3) (int)$post_idOptional. The Post ID. Does not default to the ID of the global $post. Default 0. Required:No Default:— (string|string[])$taxonomyOptional. The taxonomy slug or array ...
wp_get_post_terms( int $post_id, string $taxonomy = 'post_tag', array $args = array() ) Retrieve the terms for a post. description There is …
问循环遍历wp_get_post_terms并回显分类名称EN您可以很容易地循环遍历wp_get_post_terms()的返回值,...
Remove the post format prefix from the name property of the term objects created by wp_get_object_terms(). WordPress lookup for _post_format_wp_get_object_terms, a WordPress Function.
$post_terms = get_the_terms( $block->context['postId'], $attributes['term'] ); if ( is_wp_error( $post_terms ) || empty( $post_terms ) ) { return ''; } cc @david-binda Fix: return empty string instead of false Verified f3afb61 Contributor david-binda commented Oct ...