Title: hhr_web's Replies | WordPress.org

---

# hhr_web

  [  ](https://wordpress.org/support/users/hhr_web/)

 *   [Profile](https://wordpress.org/support/users/hhr_web/)
 *   [Topics Started](https://wordpress.org/support/users/hhr_web/topics/)
 *   [Replies Created](https://wordpress.org/support/users/hhr_web/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/hhr_web/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/hhr_web/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/hhr_web/engagements/)
 *   [Favorites](https://wordpress.org/support/users/hhr_web/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Exclude Category Returns Oldest Posts First??](https://wordpress.org/support/topic/exclude-category-return-oldest-posts-first/)
 *  Thread Starter [hhr_web](https://wordpress.org/support/users/hhr_web/)
 * (@hhr_web)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/exclude-category-return-oldest-posts-first/#post-2313276)
 * Thanks esmi, but this doesn’t fix the sorting issue of the posts.
 * I tried a fix suggested in one of the replies for this forum post: [http://wordpress.org/support/topic/query_posts-and-order-by-date](http://wordpress.org/support/topic/query_posts-and-order-by-date)
 * He commented out a $groupby declaration within the query.php file in his WP 2.5.1.
 * I found the similar line of code in my query.php (WP3.1.2) line 2234:
 *     ```
       if ( !empty( $this->tax_query->queries ) || !empty( $q['meta_key'] ) ) {
       			//$groupby = "{$wpdb->posts}.ID"; when excluding category ID this reverses sorting of posts to ASC by postdate
       		}
       ```
   
 * This fixed the specific post list I needed to target and after a cursory review
   of several post lists throughout the site, it does not appear to have broken 
   anything.

Viewing 1 replies (of 1 total)