📜  从选定的分类中获取帖子 - TypeScript 代码示例

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

代码示例1
$posts_array = get_posts(
    array(
        'posts_per_page' => -1,
        'post_type' => 'fabric_building',
        'tax_query' => array(
            array(
                'taxonomy' => 'fabric_building_types',
                'field' => 'term_id',
                'terms' => $cat->term_id,
            )
        )
    )
);