Flexible Custom Post Type Order

By satish

★ 5.0/5 (1 ratings)0+ active installationsVersion 1.1.5

Order and reorder posts, pages, and custom post types using an intuitive drag and drop interface. Create multiple custom sorting orders flexibly.

Description

Flexible Custom Post Type Order is a lightweight, powerful, and intuitive WordPress post ordering plugin. It allows you to reorder posts, pages, portfolio items, WooCommerce products, and any custom post type (CPT) using a simple drag-and-drop interface.

Unlike other post type order plugins that only give you a single global order, Flexible Custom Post Type Order allows you to create multiple independent re-ordering interfaces for the very same post type! For example, you can have one custom order for your homepage featured posts, another custom order for your archive page, and a third order for your sidebar widget.

🌟 Key Features

  • Drag and Drop Sorting: Easily sort and rearrange posts, pages, and custom post types with smooth drag & drop functionality.
  • Multiple Re-ordering Interfaces: Create multiple separate sorting orders for the same post type (e.g., Order 1, Order 2, Order 3).
  • Hierarchical Post Type Support: Reorder parent posts as well as individual child posts (sub-pages / child items) effortlessly.
  • Child Post Ordering: Re-order child posts directly from within their parent post structure.
  • Any Custom Post Type (CPT): Works with standard Posts, Pages, WooCommerce Products, Portfolio, Testimonials, Team Members, Events, Services, and any custom registered post type.
  • Developer-Friendly Query Integration: Easily apply your custom sorting order into standard WP_Query loops using simple meta_key parameters.
  • Lightweight & Fast: Clean, optimized code with zero bloat. Loads only necessary admin scripts without slowing down your site.
  • 100% Gutenberg & Classic Editor Compatible: Built to work seamlessly with modern WordPress standards and block themes.

🚀 Why Choose Flexible Custom Post Type Order?

Most standard custom post type order plugins lock you into one single order across your entire website. If you change the order for one page, it changes everywhere.

With Flexible Custom Post Type Order, you have total flexibility:
1. Multiple Display Orders: Set different sorting orders for different templates, shortcodes, and pages.
2. Easy Administration: Accessible directly via WordPress Admin under Settings and each post type menu.
3. Reset with 1-Click: Need to start fresh? A built-in “Reset Order” option ensures you never lose control of your data.

💻 Developer Guide: How to Display Ordered Posts in WP_Query

You can display any custom order on your frontend templates or custom shortcodes by simply passing the order meta key:

`php

‘post’, // Your custom post type (e.g. ‘portfolio’, ‘product’, ‘model’)
‘post_status’ => array(‘publish’),
‘posts_per_page’ => -1,
‘orderby’ => ‘meta_value_num’,
‘meta_key’ => ‘fcpto_order_1’, // Order 1 (or fcpto_order_2, fcpto_order_3, etc.)
‘order’ => ‘ASC’,
);

$query = new WP_Query($args);

if ($query->have_posts()) :
while ($query->have_posts()) : $query->the_post();
the_title(‘

‘, ‘

‘);
endwhile;
wp_reset_postdata();
endif;
?>
`

Installation

  1. Upload the flexible-custom-post-type-order folder to your /wp-content/plugins/ directory (or install via Plugins > Add New in WordPress Admin).
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Navigate to Settings > Multiple Post Types Order to configure which post types you want to enable reordering for.
  4. Click on the MPT Order links that appear under your post types menu in the admin dashboard to start drag-and-drop reordering.

FAQ

How do I reorder custom post types using drag and drop?

Once activated, go to Settings > Multiple Post Types Order and enable ordering for your desired post types. Then navigate to that post type’s admin menu (e.g., Posts, Pages, Products) and click on the MPT Order link. You can simply drag and drop the items into your desired position and click “Save Order”.

Can I create different sorting orders for the same post type?

Yes! This is the main highlight of Flexible Custom Post Type Order. You can configure multiple order sets (Order 1, Order 2, etc.) and apply different sorting to different sections of your website.

Does this plugin support hierarchical post types (parent and child posts)?

Yes. It fully supports hierarchical post types like Pages or hierarchical custom post types. When you reorder a parent post, its child posts move along with it, and you can also reorder child posts individually.

How do I apply custom ordering to my frontend theme queries?

Simply add 'orderby' => 'meta_value_num' and 'meta_key' => 'fcpto_order_1' (or your corresponding order number) to your WP_Query parameters. The plugin also provides pre-generated query code right inside the admin screen for quick copying.

Does it work with WooCommerce products?

Yes. You can reorder WooCommerce products and custom shop items just like standard WordPress posts.

What if my desired order is not displaying on the frontend?

If your front-end order does not reflect the admin sorting immediately, go to the re-ordering screen, click “Reset Order”, arrange the items again, and click “Save Order”.

Does this plugin affect default WordPress queries automatically?

The plugin keeps your default queries safe and gives you complete control over where and when your custom orders are applied via WP_Query.

Screenshots

Changelog

1.1.5

  • PHP 8+ Compatibility: Fixed unsafe unserialize() calls that caused warnings when options were not yet set.
  • Fixed PHP 8 undefined index notices in settings page (fcpto-option.php).
  • Removed @ error suppressors — replaced with proper isset() checks throughout.
  • Fixed critical logic bug in fcpto-fun.php: empty() was incorrectly resetting order values of 0 on every page load; now uses strict === '' check.
  • Fixed broken drag-and-drop order save: sanitize_text_field was stripping jQuery serialize output characters; now uses wp_parse_str() for correct parsing.
  • Removed session_start() from fcpto-list.php which caused headers already sent conflicts in WordPress.
  • Tested and verified compatibility with WordPress 6.8.

1.1.4

  • Added high-resolution assets (Icons & Banners) for WordPress Plugin Directory.
  • Optimized search tags, short description, and full description for enhanced SEO and discoverability.
  • WordPress 6.7 compatibility verified.

1.1.3

  • SEO enhancements and keyword optimization.
  • Tested compatibility with WordPress 6.7.
  • Improved drag and drop sort performance.
  • Enhanced documentation and query code examples.

1.1.2

  • Minor bug fixes and UI improvements in admin reordering.

1.1.1

  • Gutenberg block editor compatibility fixes.

1.0.0

  • Initial release of Flexible Custom Post Type Order.