term_id; // Query string: find all posts in the given category and order them by their SLUG, descending // Of course you can change the order using other columns of POSTS table $querystr = " SELECT wposts.* FROM $wpdb->posts wposts, $wpdb->term_relationships wjoin, $wpdb->term_taxonomy wcat WHERE wposts.ID = wjoin.object_id AND wcat.term_taxonomy_id = wjoin.term_taxonomy_id AND wposts.post_status = 'publish' AND wposts.post_type = 'post' AND wcat.term_id = $currentCatID ORDER BY wposts.post_name DESC LIMIT 0,10"; // Retrieve resultset $posts = $wpdb->get_results($querystr, OBJECT); // If I have posts to display if (have_posts()){ // Now I have ordered posts, I can display them (the Loop) foreach ($posts as $post_count => $post){ start_wp(); // print data for each post found echo "You must customize the way your articles look. Edit category.php to do this."; } } ?>