How to Exclude Draft Posts from the Post Types Order Re-Order Interface
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
-
Remove admin sort filter for specific post typehttps://wordpress.org/support/topic/remove-admin-sort-filter-for-specific-post-type/
-
[Plugin: Post Types Order] Feature is for client – how to remove donate buttonhttps://wordpress.org/support/topic/plugin-post-types-order-feature-is-for-client-how-to-remove-donate-button/
-
[Plugin: Post Types Order] Don't allow users to re-order?https://wordpress.org/support/topic/plugin-post-types-order-dont-allow-users-to-re-order/
-
Post Listing by modified datehttps://wordpress.org/support/topic/post-listing-by-modified-date/
-
[Plugin: Post Types Order] Show custom columnhttps://wordpress.org/support/topic/plugin-post-types-order-show-custom-column/
-
Re-ordering post_type=propertyhttps://wordpress.org/support/topic/re-ordering-post_typeproperty/
-
Enable ordering for specific post types?https://wordpress.org/support/topic/enable-ordering-for-specific-post-types/
-
[Plugin: Post Types Order] Direct access to re-order pagehttps://wordpress.org/support/topic/plugin-post-types-order-direct-access-to-re-order-page/
-
Just Order Published Articleshttps://wordpress.org/support/topic/just-order-published-articles/
-
Post Type Reorderhttps://wordpress.org/support/topic/post-type-reorder/
-
Remove Drafts from Reordering Pagehttps://wordpress.org/support/topic/remove-drafts-from-reordering-page/
-
Capabalitieshttps://wordpress.org/support/topic/capabalities/
-
[Plugin: Post Types Order] Remove 'Re-Order' from Admin menu of some post typeshttps://wordpress.org/support/topic/plugin-post-types-order-remove-re-order-from-admin-menu-of-some-post-types/
-
Add Re-Order page on custom menu (Created by theme)https://wordpress.org/support/topic/add-re-order-page-on-custom-menu-created-by-theme/
-
Option to only show published post in reorderhttps://wordpress.org/support/topic/option-to-only-show-published-post-in-reorder/
-
Re-order Usershttps://wordpress.org/support/topic/re-order-users/
-
Activate on specific post typeshttps://wordpress.org/support/topic/activate-on-specific-post-types/
-
signle post typehttps://wordpress.org/support/topic/signle-post-type/
-
Front End?https://wordpress.org/support/topic/front-end-1/
-
'Subscriber' capable of reordering our postshttps://wordpress.org/support/topic/subscriber-capable-of-reordering-our-posts/
-
No "Re-Order" linkhttps://wordpress.org/support/topic/no-re-order-link/
-
Non-Heirarchal?https://wordpress.org/support/topic/non-heirarchal/
-
Disable for post typehttps://wordpress.org/support/topic/disable-for-post-type/
-
Re-order a combination of post typeshttps://wordpress.org/support/topic/re-order-a-combination-of-post-types/
-
[Plugin: Post Types Order] Show draft postshttps://wordpress.org/support/topic/plugin-post-types-order-show-draft-posts/
-
[Plugin: Post Types Order] Exclude Feed From Post Types Reorder.https://wordpress.org/support/topic/plugin-post-types-order-exclude-feed-from-post-types-reorder/
-
[Plugin: Post Types Order] Hide draftshttps://wordpress.org/support/topic/plugin-post-types-order-hide-drafts/
-
Draft and Privatehttps://wordpress.org/support/topic/draft-and-private/
-
Sorting based on custom rolehttps://wordpress.org/support/topic/sorting-based-on-custom-role/
-
Remove Re-Order submenu for standard post typehttps://wordpress.org/support/topic/remove-re-order-submenu-for-standard-post-type/
-
How to only show published postshttps://wordpress.org/support/topic/how-to-only-show-published-posts/