I don’t arrive to do order_by title when i have a conditionnal year in a request
I tried your code and is working fine for me $args = array( ‘post_type’ => ‘project’,’posts_per_page’ => -1,’year’ => date(‘Y’) – 2, ‘orderby’=> ‘title’,’order’ => ‘ASC’); $myposts = get_posts( $args ); The thing is as you can see he is only fetching the posts from 2015. If you don’t have any posts with the publish … Read more