Title: WP_Query Loop Overwritten
Last modified: August 22, 2016

---

# WP_Query Loop Overwritten

 *  Resolved [kokoruz](https://wordpress.org/support/users/kokoruz/)
 * (@kokoruz)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/wp_query-loop-overwritten/)
 * I have the following code that orders the CPT alphabetically in this query for
   easy viewing but when I activated the plugin and arranged the posts in the order
   I wanted them to display as someone clicks through the posts with pagination 
   it overwrote my alpha listing query. Help!
 * ‘orderby’=>’title’,’order’=>’ASC’
 *     ```
       <ul class="row work-list" style="color:#FFF">
       <?php
       $args = array( 'post_type' => 'work', 'posts_per_page' => -1, 'orderby'=>'title','order'=>'ASC' );
       $loop = new WP_Query( $args );
       while ( $loop->have_posts() ) : $loop->the_post();
       ?>
       <li class="col-md-4"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
       <?php
       endwhile;
       ?>
       </ul>
       ```
   
 * [https://wordpress.org/plugins/post-types-order/](https://wordpress.org/plugins/post-types-order/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [nsp-code](https://wordpress.org/support/users/nsp-code/)
 * (@nsp-code)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/wp_query-loop-overwritten/#post-5399831)
 * You should turn off the autosort and include ‘orderby’ => ‘menu_order’ within
   queries where sort need to apply.

Viewing 1 replies (of 1 total)

The topic ‘WP_Query Loop Overwritten’ is closed to new replies.

 * ![](https://ps.w.org/post-types-order/assets/icon-128x128.png?rev=1226428)
 * [Post Types Order](https://wordpress.org/plugins/post-types-order/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-types-order/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-types-order/)
 * [Active Topics](https://wordpress.org/support/plugin/post-types-order/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-types-order/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-types-order/reviews/)

## Tags

 * [post order](https://wordpress.org/support/topic-tag/post-order/)

 * 1 reply
 * 2 participants
 * Last reply from: [nsp-code](https://wordpress.org/support/users/nsp-code/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/wp_query-loop-overwritten/#post-5399831)
 * Status: resolved