📜  wp get_posts 返回 ids - PHP 代码示例

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

代码示例2
get_posts(array(
    'fields'          => 'ids', // Only get post IDs
    'posts_per_page'  => -1
));