📜  相同的分类法添加多个帖子类型 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:25.690000             🧑  作者: Mango

代码示例1
$articles_in_post_type = get_posts( array(
    'fields' => 'ids',
    'post_type' => 'post',
    'posts_per_page' => -1,
));
$tags = wp_get_object_terms( $articles_in_post_type, 'post_tag', array('ids') );