Back to Community

Why Your Posts Go Random After Activating Post Types Order (And How to Fix It)

17 threads Sep 16, 2025 PluginPost types order

Content

A common issue reported by users of the Post Types Order plugin is that immediately after activation, their front-end and back-end post listings suddenly display old or seemingly random posts. This can be alarming, but it's usually a simple configuration issue rather than a bug that deletes content.

Why This Happens

The Post Types Order plugin works by changing the default WordPress ordering from date to menu_order. When first activated, if the plugin's Auto Sort feature is enabled, it immediately applies this new order. Since your posts may not have a custom menu_order value set yet, WordPress can fall back to its default behavior, which sometimes results in an unexpected order that appears random.

How to Fix It

Based on community reports and suggested fixes from the Post Types Order team, here are the most effective solutions.

Solution 1: Disable Auto Sort and Use a Custom Query

The most recommended fix is to take manual control over where the sorting is applied.

  1. Go to Settings » Post Types Order.
  2. Uncheck the Auto Sort option and save your changes.
  3. You must now manually edit your theme's template files to apply the custom order where you want it. In your theme's query (often in index.php, archive.php, or a custom template), you need to add the argument 'orderby' => 'menu_order'.

For example, a basic query might look like this:

$query = new WP_Query( array( 
    'post_type' => 'post', 
    'orderby' => 'menu_order', 
    'order' => 'ASC' 
) );

This method ensures the custom order only applies to specific areas you choose, preventing conflicts.

Solution 2: Set a Default Order for All Posts

If the random order is caused by all posts having a menu_order of 0, you can set a sensible default.

  1. Navigate to your post listing (e.g., Posts » All Posts).
  2. Use the drag-and-drop interface provided by the plugin to set a specific order for your posts. Simply saving a new order will assign appropriate menu_order values.
  3. With Auto Sort still enabled, the plugin will now use this defined order instead of a random one.

Solution 3: Check for Plugin or Theme Conflicts

In some cases, other code can interfere. As seen in one thread, a user discovered a separate, problematic plugin was causing their custom post types to disappear, which was mistakenly attributed to Post Types Order. To rule this out:

  1. Temporarily switch to a default WordPress theme like Twenty Twenty-Four.
  2. Deactivate all other plugins except for Post Types Order.
  3. If the issue is resolved, reactivate your plugins one-by-one to identify the culprit.

Important Note: What Happens If You Deactivate the Plugin?

A frequent question is whether custom sorting remains if the plugin is deactivated. The answer is twofold:

  • The menu_order values assigned to your posts are saved in the database and will remain.
  • However, the sorted display will not appear on your front-end unless your theme's queries explicitly include 'orderby' => 'menu_order'. Once you deactivate the plugin, WordPress will revert to its default ordering (usually by date). This is not a bug; it is how WordPress functions.

If you wish to deactivate the plugin but keep your custom order, you must implement Solution 1 before deactivating it.

By understanding how the plugin interacts with WordPress's core ordering system, you can effectively troubleshoot and maintain the perfect order for your posts.

Related Support Threads Support