'orderby'=>"post_date" not working
-
I have just realized that the get_posts function is not displaying the latests posts. It seems to display posts that is a day or two old and then goes back until it reaches the numberposts amount.
The first batch is displaying featured 4 posts:
$args = array( 'numberposts' => 4, 'post_status'=>"publish",'post_type'=>"post",'orderby'=>"post_date",'order'=> 'DESC','tag'=>"Feature",'category__not_in'=> array(19,27,454)); $postslist = get_posts( $args );
And then this is the part that is not displaying the newest posts (perhaps the above code messes things up?)
$args = array('offset'=> 4, 'numberposts' => 10, 'post_status'=>"publish",'post_type'=>"post",'order'=> 'DESC','orderby'=>"post_date",'post__not_in'=> $not_duplicate, 'category__not_in'=> array(19,27,454));
here’s the page: https://hushmagazine.ca/
Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘'orderby'=>"post_date" not working’ is closed to new replies.