• Resolved 1f3802615

    (@1f3802615)


    New to WordPress and PHP,

    When I drag and drop posts into a new order on the admin page, the menu_order of the posts updates correctly in the database. However, when I refresh the admin page, the order resets.

    I see the bit in the FAQ on how to override ‘orderby’ and ‘order’, but I don’t understand where I would do this. Do I add this code to the wp-includes/class-wp-query.php file, or somewhere else?

    Is this even what’s causing the order reset?

    Thanks!

    • This topic was modified 6 years, 5 months ago by 1f3802615.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter 1f3802615

    (@1f3802615)

    I solved the problem.

    or future reference, for any noobs like me facing a similar problem:

    It turns out this behavior was only happening in one of the admin panels, one that’s part of a video gallery plugin I’m using, which creates a custom Post Type called video.

    I looked through the file system on that plug-in and found a file called class.posttype.php. In that file there was a function called admin_order that specified the orderby criteria.

    • This reply was modified 6 years, 5 months ago by 1f3802615.
    • This reply was modified 6 years, 5 months ago by 1f3802615.
    • This reply was modified 6 years, 5 months ago by 1f3802615.
    • This reply was modified 6 years, 5 months ago by 1f3802615.
    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Persist New Order After Drag and Drop?’ is closed to new replies.