Leave a Reply

1 comment

  1. I had trouble with a similar issue of sorting posts from a custom post type in a specified order on their archive page. I used http://wordpress.org/extend/plugins/sort-query-posts/.

    The plugin lets you sort posts by author, comment_count, date, id, menu_order, modified, parent, or title. It only requires you to add the following lines

    <?php query_posts(array('post_type'=>'post_type_name', 'posts_per_page' => 20)); ?>
    <?php sort_query_posts_by('sort_type', 'order'); ?>
    

    to your code, before the loop. Where ‘sort_type’ is the item by which your posts are sorted and ‘order’ is asc, desc, or rand. (very clear instructions in the short readme file).