Title: Ordering breaks WP_Query
Last modified: February 20, 2020

---

# Ordering breaks WP_Query

 *  [talqari](https://wordpress.org/support/users/talqari/)
 * (@talqari)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/ordering-breaks-wp_query/)
 * Hi,
 * On the site I have an custom template that makes an WP_Query to fetch certain
   type of custom post type. WP_Query is working correctly and ordering thins accordingly
   to the args array. When I move one post with your plugin the WP_Query stops working
   correctly. The order is only by title and I can’t change it to anything else,
   most of the args are not working. When I move the post back to its original position
   everything is still broken. When I deactivate your plugin everything starts to
   work again.
 * My args is as simple as:
    $args = array( ‘post_type’ => ‘asunnot’, ‘posts_per_page’
   => -1, ‘meta_key’ => ‘tyyppi’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘DESC’);
 * I have fixed the problem for now by deactivating the plugin. This is more just
   as a note if there is a potential bug in the plugin.

The topic ‘Ordering breaks WP_Query’ 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/)

 * 0 replies
 * 1 participant
 * Last reply from: [talqari](https://wordpress.org/support/users/talqari/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/ordering-breaks-wp_query/)
 * Status: not a support question