Title: Bug!!
Last modified: October 6, 2017

---

# Bug!!

 *  Resolved [mif32](https://wordpress.org/support/users/mif32/)
 * (@mif32)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/bug-201/)
 * I found bug.
    If you deactivated “Auto Sort” and use AJAX for getting posts list.
   it will work with auto sort. at the class.cpto.php line 153 you have “if (is_admin())”
   if you use ajax it see like admin! I changed it to “if (is_admin() && isset($
   _GET[‘post_type’]))” it help

Viewing 1 replies (of 1 total)

 *  Plugin Author [Maya](https://wordpress.org/support/users/tdgu/)
 * (@tdgu)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/bug-201/#post-9565063)
 * I see your point, however there isn’t a way (documented by WordPress Codex) to
   identify if an AJAX call is coming from dashboard or front side. For that reason,
   it presume the call is from admin.
    A GET does not always include a ‘post_type’
   argument, this might work only for your particular situation. A workaround for
   such scenario would be to use a filter ‘pto/posts_orderby/ignore’ and trigger
   it or not when AJAX, depending on what you need, more details at [https://www.nsp-code.com/ignore-sort-apply-for-certain-query-on-post-types-order/](https://www.nsp-code.com/ignore-sort-apply-for-certain-query-on-post-types-order/)

Viewing 1 replies (of 1 total)

The topic ‘Bug!!’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Maya](https://wordpress.org/support/users/tdgu/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/bug-201/#post-9565063)
 * Status: resolved