• Resolved samedwards

    (@samedwards)


    You’re providing the argument menu-order to wp_insert_post() rather than the correct menu_order, and as such, the order of the duplicated menu is not correct.

    I currently have the following workaround in place:

    
    
    add_filter('wp_insert_post_data', function ($data, $postarr) {
        if ($data['post_type'] === 'nav_menu_item' && isset($postarr['menu-order'])) {
            $data['menu_order'] = (int) $postarr['menu-order'];
        }
    
        return $data;
    }, 10, 2);

Viewing 1 replies (of 1 total)
  • Plugin Author Bjorn Manintveld

    (@bcmdev)

    Weirdly enough, this never caused me problems before while testing the plugin.
    I will fix this as soon as possible.

    Thank you for reporting.

Viewing 1 replies (of 1 total)
  • The topic ‘Menu Order Not Maintained’ is closed to new replies.