Back to Community

How to Exclude Draft Posts from the Post Types Order Re-Order Interface

31 threads Sep 16, 2025 PluginPost types order

Content

A common question from users of the free Post Types Order plugin is how to manage the list of items shown in the Re-Order interface. By default, the plugin displays all posts regardless of their status, including published posts, drafts, and private posts. This can lead to a cluttered and confusing experience when you only want to arrange the content that is live on your site.

Why This Happens

The plugin's core functionality is designed to reorder all items of a selected post type. The default query it uses to fetch posts for the drag-and-drop interface does not filter by post status. This is a design choice in the free version, and as noted in several support threads, the ability to filter by status is a feature reserved for the Advanced Post Types Order plugin.

Available Solutions

While the official, out-of-the-box solution for filtering by post status is part of the premium offering, community members have discovered a code-based workaround for the free version. This involves modifying the plugin's query parameters.

Solution 1: The Code Snippet (Use with Caution)

Based on community feedback, a potential fix is to edit the plugin's core file to change the query arguments. The suggestion is to locate the `$args` array within the plugin's code (reportedly near line 492 in one version) and add a 'post_status' parameter.

['post_status'] => 'publish'

Important Warning: Modifying plugin files directly is generally not recommended. Any changes you make will be overwritten the next time the plugin is updated, requiring you to reapply the modification. This method should only be attempted if you are comfortable with code and understand the risks.

Solution 2: Official Advanced Version

For a stable, update-proof solution, the Advanced Post Types Order plugin includes a dedicated settings area for the Re-Order interface. This includes a 'Status' option that allows you to select exactly which post statuses (e.g., Publish, Draft, Private) should be included when reordering. This provides a clean, user-friendly way to achieve the desired result without touching any code.

Conclusion

If your workflow requires frequently reordering posts and you need to exclude drafts, you have two paths. You can implement a temporary code hack with the understanding that it may break on updates, or you can explore the official Advanced Post Types Order plugin for a permanent and supported solution with a graphical interface.

Related Support Threads Support