# Custom Post Order

Reorder posts, pages, and public custom post types using WordPress native `menu_order`.

## Settings

Configure supported post types, query targets, and permissions in the module settings modal. Reordering happens directly on each post type's list table (**Posts**, **Pages**, etc.) via a drag handle on every row.

## Developer filters

| Filter | Purpose |
|--------|---------|
| `wp_powersuite_custom_post_order_post_types` | Available post type objects for the UI |
| `wp_powersuite_custom_post_order_apply_to_query` | Whether to apply order to a `WP_Query` |
| `wp_powersuite_custom_post_order_orderby_args` | `orderby` / `order` arguments applied to queries |

## AJAX actions

- `wpps_cpo_save_order` — save `menu_order` for validated post IDs
- `wpps_cpo_reset_order` — reset `menu_order` to `0` for a post type scope

All actions require the `wpps_custom_post_order` nonce and the configured reorder capability.

## Notes

- Ordering is stored in `menu_order` (compatible with standard WordPress export/import).
- Reordering is done by dragging the handle on each list table row; changes save automatically on drop.
- Custom order is applied only to the main query (blog home, archives, search, and — optionally — admin list tables). Explicit query `orderby` values are respected when configured.
- List table drag-and-drop only loads when sorting by menu order with no active search.
