Title: Not saving after sorting
Last modified: March 11, 2023

---

# Not saving after sorting

 *  Resolved [Matt Sartori](https://wordpress.org/support/users/msartori/)
 * (@msartori)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/not-saving-after-sorting/)
 * This has been happening with all sites I’m using Simple Custom Post Order on 
   for the last month or two. I can drag and drop all I want, but the order is never
   saved.
 * This shows what happens when I drag items into a new order and refresh the page.
   [https://share.getcloudapp.com/bLulGlLl](https://share.getcloudapp.com/bLulGlLl)
 * I am using the Twenty Twenty-Three theme with only Simple Custom Post Order and
   Custom Post Type UI activated. It also happens with just normal post categories
   when I don’t have CPT UI activated.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Miha](https://wordpress.org/support/users/mplusb/)
 * (@mplusb)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/not-saving-after-sorting/#post-16558063)
 * Hi [@msartori](https://wordpress.org/support/users/msartori/),
 * Thanks for reaching out!
 * Can you please go to Settings > SCPOrder > and make sure to check Categories 
   from that list and the custom post category for Books > save.
 * This should solve it.
 * Warmly,
 * Mihaela
 *  Thread Starter [Matt Sartori](https://wordpress.org/support/users/msartori/)
 * (@msartori)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/not-saving-after-sorting/#post-16558115)
 * Hi Mihaela,
 * Thanks for getting back to me. The Category sorting is enabled as are many other
   terms and post types, but none of them will save their position after dragging
   and dropping.
 * I did click the Update button just to see if that worked but it did not.
 * ![](https://i0.wp.com/fscrastg.wpengine.com/wp-content/uploads/2023/03/Screenshot-
   2023-03-14-at-8.29.23-AM.png?ssl=1)
 *  Thread Starter [Matt Sartori](https://wordpress.org/support/users/msartori/)
 * (@msartori)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/not-saving-after-sorting/#post-16558152)
 * Hi Mihaela,
 * One more thing I’d like to mention is that the response from the server doesn’t
   seem to be what I’d expect. For instance when the request is sent, it’s sent 
   with an array of IDs in the order I put them on the screen, however the returned
   value is 0. I would expect a 1 or TRUE if successful, not a zero.
 * ![](https://i0.wp.com/fscrastg.wpengine.com/wp-content/uploads/2023/03/Screenshot-
   2023-03-14-at-8.39.07-AM.png?ssl=1)
 * ![](https://i0.wp.com/fscrastg.wpengine.com/wp-content/uploads/2023/03/Screenshot-
   2023-03-14-at-8.39.14-AM.png?ssl=1)
 * Thanks,
   Matt
 *  Thread Starter [Matt Sartori](https://wordpress.org/support/users/msartori/)
 * (@msartori)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/not-saving-after-sorting/#post-16558912)
 * Hi Mihaela,
 * Can you please reopen this ticket/thread? It has not yet been resolved.
 * Thanks,
   Matt
 *  [Miha](https://wordpress.org/support/users/mplusb/)
 * (@mplusb)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/not-saving-after-sorting/#post-16569625)
 * Can you please let me know your WordPress version and PHP version?
 * We are trying to reproduce the same behavior but without any luck.
 * Thank you!
 *  Thread Starter [Matt Sartori](https://wordpress.org/support/users/msartori/)
 * (@msartori)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/not-saving-after-sorting/#post-16569673)
 * Hi Mihaela,
 * WordPress 6.1.1
   PHP 8.0.28Percona 5.7.40
 * I also tried **Intuitive Custom Post Order** with the same results when using
   the Twenty Twenty-Three theme and all plugins (except CPT UI) turned off.
 * The term_order field is in the terms table. The order doesn’t seem to update 
   in the table after moving terms around using the UI. I’m not able to sort anything
   from custom post types to posts to pages to taxonomies.
 * I did find a set of plugins that are working for me which are **Post Types Order**
   and **Category Order and Taxonomy Terms Order** but I’d much rather be using **
   Simple Custom Post Order**.
 * I’m not sure if this makes a difference but I’m hosted with WP Engine.
 *  [Miha](https://wordpress.org/support/users/mplusb/)
 * (@mplusb)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/not-saving-after-sorting/#post-16580218)
 * Thank you, Matt!
 * I tried again with those same plugins, the theme, WP version, and PHP version
   and unfortunately I could not replicate the same issue.
 * The most I can do at the moment is open a ticket regarding this so our dev team
   can take a closer look and see if they can replicate and investigate this.
 * You can follow the progress here: [https://github.com/ColorlibHQ/simple-custom-post-order/issues/121](https://github.com/ColorlibHQ/simple-custom-post-order/issues/121)
 * I’m sorry for the trouble! Thank you for your patience.
 * Warmly,
 * Mihaela
 *  [ziegel](https://wordpress.org/support/users/ziegel/)
 * (@ziegel)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/not-saving-after-sorting/#post-16670645)
 * the support of **‘page-attributes**’ is required to be first added to the post
   type generated manually, in order, to later call the ‘**menu_order**‘ directive.
   This directives allows the order to be done according to defined setting and 
   not according to default post creation time.
 * You may read more about it, [here](https://wordpress.stackexchange.com/questions/212169/new-page-does-not-get-a-menu-order)
 * So the adding of the element to be controlled on functions.php would now look
   like this:
 *     ```wp-block-code
       function list_faq() {
           register_post_type('faq_questions',
               array(
                   'labels' => array(
                       'name' => __('FAQ'),
                       'singular_name' => __('FAQ')
                   ),
                   'public' => true,
                   'has_archive' => true,
                   'supports' => array('title', 'editor', 'thumbnail', 'excerpt' , 'page-attributes')
               )
           );
       }
   
       add_action('init', 'list_faq');
       ```
   
 * And the placing on the website of the fetched content would now look like this:
 *     ```wp-block-code
       <div class="tabcontent-box" id="id">
       	<ul class="ul-content">
       	<?php
       	$query = new WP_Query(array(
       		'post_type' => 'faq_questions',
       		'orderby' => 'menu_order',
       		'order' => 'ASC',
       		'tax_query' => array(
       			array(
       				'taxonomy' => $current_term->taxonomy,
       				'field' => 'slug',
       				'terms' =>	$current_term->slug
   
       			)
       		)
       	));
       	while ( $query->have_posts() ) : $query->the_post(); ?>
       		<li>
       			<a href="<?php the_permalink() ?>" class="tabcontent-link"><?php the_title() ?></a>
       		</li>
       	<?php endwhile; ?>
       	</ul>
       </div>
       ```
   
 * And now… the magic returns, and moving by drag-and-drop of the elements with 
   this plugin is back to working.
 * You may also manually change the numbering of **menu_order** on the WordPress
   POST data base, according the **post_type** of the highlighted chosen by you 
   name. This is required when you have more p
 *  [Phil Kurth](https://wordpress.org/support/users/philkurth/)
 * (@philkurth)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/not-saving-after-sorting/#post-16864262)
 * Hi,
 * I just face the same issue in a website and spent a little while debugging and
   found the issue to be with object caching. When I drag-and-drop to re-order, 
   then reload the page, the posts go back into their original order. If, however,
   I purge the object cache after changing the order, the changed order persists
   in the post list screen.
 * It may be that recent changes to WP_Query (see [here](https://make.wordpress.org/core/2022/10/07/improvements-to-wp_query-performance-in-6-1/))
   could be the cause – I haven’t dug that far into it but it seems likely to me
   as this plugin always worked without issue previously.
 * Cheers,
   Phil

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Not saving after sorting’ is closed to new replies.

 * ![](https://ps.w.org/simple-custom-post-order/assets/icon-256x256.jpg?rev=2969435)
 * [Simple Custom Post Order](https://wordpress.org/plugins/simple-custom-post-order/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-custom-post-order/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-custom-post-order/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-custom-post-order/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-custom-post-order/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-custom-post-order/reviews/)

## Tags

 * [order](https://wordpress.org/support/topic-tag/order/)
 * [save](https://wordpress.org/support/topic-tag/save/)

 * 9 replies
 * 4 participants
 * Last reply from: [Phil Kurth](https://wordpress.org/support/users/philkurth/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/not-saving-after-sorting/#post-16864262)
 * Status: resolved