• Resolved Michal Svorc

    (@michalsvorc)


    Hello,

    I’m using v4.10.1, initializing customized meta-box/demo/demo.php from github. When I upload multiple images through ‘image_advanced’ type, drag-and-drop reorder them and save the post, they’re showing on frontend in my customized order.

    But when I Edit the post, they are ordered back as on first upload, dismissing my reordering. I have to reorder them again, else on post Update they’re showing in reseted order on frontend also.

    I’ve tested it with uploader types: image_advanced, image_upload, plupload_image.

    thickbox_image, and image works fine and remember custom reorder between post edits.

    Thank You

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Anh Tran

    (@rilwis)

    Hi Michal,

    Can you please post the code you used here?

    Thread Starter Michal Svorc

    (@michalsvorc)

    Hi Anh,
    I could not reproduce this issue on fresh WP install, so plugin is ok. I should’ve done that test first, sorry for that.

    So I’m guessing something is colliding with it on my installation. Code is the same as in demo.php, no changes in fields array and other fields are working fine.

    I’m going to investigate it further and let you know what was the issue.

    Thank you

    Thread Starter Michal Svorc

    (@michalsvorc)

    My bad,

    function wp_loop_change_order($query) {
        $query->set('orderby', 'menu_order');
    }
    add_action('pre_get_posts', 'wp_loop_change_order');

    in my child theme was interfering with image order on admin page. Strange that it was not affecting type ‘thickbox_image’ and ‘image’, took me a while to find the culprit. Again, sorry for not testing it first, loving this plugin, keep up good work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Image upload reordering gets reset on post update’ is closed to new replies.