📜  按日期排序 wp php 代码示例

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

代码示例1
$query = new WP_Query(array(
    'post_status' => 'publish',
    'orderby' => 'publish_date',
    'order' => 'DESC'
  ));
//DESC sorts by newest, ASC by oldest. GL fellow grepper user