Linux 软件免费装
Banner图

Intuitive Custom Post Order

开发者 hijiri
更新时间 2025年9月16日 11:37
捐献地址: 去捐款
PHP版本: 3.5.0 及以上
WordPress版本: 6.8.2
版权: GPLv2 or later
版权网址: 版权信息

标签

post order posts order custom post type order order posts custom taxonomy order order post

下载

2.0.0 2.0.1 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.1.2 3.1.2.1 3.1.4 3.2.0 3.0.8 1.1.0 3.1.5.1 1.2.1 2.0.4 3.1.3 3.1.4.1 3.1.5

详情介绍:

Intuitively reorder Posts, Pages, Custom Post Types, Taxonomies, and Sites with a simple drag-and-drop interface. Intuitive Custom Post Order lets you reorder items with simple drag and drop in the WordPress admin.\ You can sort Posts, Pages, Custom Post Types, Taxonomies, and (on Multisite) Sites. Go to Settings → Intuitive CPO and select which content types you want to make sortable.\ Once enabled, just drag and drop items in the list tables—no extra setup is required. If you create custom queries in your theme or plugins, set orderby=menu_order and order=ASC to respect the drag-and-drop order.\ To keep the default WordPress order (by date), explicitly set orderby=date and order=DESC. Source code and development are available on GitHub.

安装:

  1. Upload the 'intuitive-custom-post-order' folder to the /wp-content/plugins/ directory.
  2. 通过 WordPress 的“插件”菜单激活插件.
  3. Go to Settings → Intuitive CPO and choose which post types or taxonomies you want to make sortable.
  4. Simply drag and drop items in the list tables to reorder them.

屏幕截图:

  • Reordering posts with drag and drop.
  • Reordering taxonomy terms.
  • Network settings (for Multisite).
  • Reordering Sites in Network Admin (for Multisite).

升级注意事项:

3.0.3 Expand Database Table: wp_terms.

常见问题:

Do I need to change my theme to make ordering work?

No. After activation, items are sortable in the admin UI, and front-end queries for enabled post types are ordered by menu_order ASC automatically—unless you explicitly pass your own orderby.

How do I make my custom query respect the drag-and-drop order?

Specify orderby=menu_order and order=ASC in your query args. WP_Query: ` 'your_cpt', 'orderby' => 'menu_order', 'order' => 'ASC', ) ); ?> ` get_posts(): ` 'your_cpt', 'orderby' => 'menu_order', 'order' => 'ASC', ) ); ?> `

I want date order (newest first) for a specific query. How?

Explicitly set: ` 'date', 'order' => 'DESC', ) ); ?> ` For get_posts(), the plugin supports a small switch: ` 'default_date', 'order' => 'DESC', ) ); ?> `

Is query_posts() supported?

query_posts() is discouraged by WordPress core because it alters the main query in a fragile way.\ Use pre_get_posts (recommended) or WP_Query instead. Example with pre_get_posts to force date order on the main blog page: ` is_main_query() ) { return; } if ( is_home() ) { $q->set( 'orderby', 'date' ); $q->set( 'order', 'DESC' ); } } ); ?> `

Does this work with taxonomies and terms?

Yes. For enabled taxonomies, terms can be reordered and are returned in that order on the front end.\ When you build custom term queries, make sure you don’t override the order unless you intend to.

Multisite: can I reorder Sites in Network Admin?

Yes. When enabled in Network settings, Sites are ordered by menu_order ASC. Drag & drop in Network Admin updates the order.

How can I move a post from the second page to the top of the first page?

Go to the "Screen Options" tab at the top right of the list table and increase the "Number of items per page".\ This way, all items you want to reorder will appear on the same page and can be dragged to the desired position.

更新日志:

3.2.0 3.1.5.1 3.1.4.1 3.1.4 3.1.3 3.1.2.1 3.1.2 3.1.1 3.1.0 3.0.8 3.0.7 3.0.6 3.0.5 3.0.4 3.0.3 3.0.1 & 3.0.2 3.0.0 2.1.0 2.0.9 2.0.8 2.0.7 2.0.6 2.0.5 2.0.4 2.0.3 2.0.2 2.0.0 1.2.1 1.2.0 1.1.1 1.1.0 1.0.0 Initial Release