I am trying to get posts in Ascending order using WP_Query,
$args = array(
'date_query' => array(
array(
'year' => $ppy,
'orderby' => 'post_date',
'order' => 'ASC',
),
),
);
$query = new WP_Query( $args );
But I am getting posts in descending order, I var_dumped the query and noticed that order is still DESC,
[request] => SELECT SQL_CALC_FOUND_ROWS wpqk_posts.ID FROM wpqk_posts WHERE 1=1 AND ( YEAR( wpqk_posts.post_date ) = 2017 ) AND wpqk_posts.post_type = 'post' AND ( wpqk_posts.post_status = 'publish' OR wpqk_posts.post_status = 'acf-disabled' OR wpqk_posts.post_status = 'private' ) ORDER BY wpqk_posts.post_date DESC LIMIT 0, 10