• Using this:

    $col = 'posts_per_page=4&author=1,2,3';
    
    		function filter_authors($groupby) {
    		  global $wpdb;
    		  $groupby = " {$wpdb->posts}.post_author";
    		 return $groupby;
    		}
    		add_filter('posts_groupby','filter_authors');
    		$the_query = new WP_Query( $col );

    The filter works very well, but the results are ASC, I need it to be DESC. Is there some hack to it?

  • The topic ‘WP_Query using filter posts_groupby, but getting last post from author’ is closed to new replies.