• Resolved mif32

    (@mif32)


    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

    (@tdgu)

    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/

Viewing 1 replies (of 1 total)

The topic ‘Bug!!’ is closed to new replies.