开发者 | wpunicorn |
---|---|
更新时间 | 2025年10月5日 07:20 |
PHP版本: | 7.4 及以上 |
WordPress版本: | 6.8 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
menu_order
field for maximum compatibility.
Key Features
menu_order
field for maximum theme compatibilitypostordercontrol_get_ordered_posts()
for easy theme integrationmenu_order
field to store post ordering:
menu_order
value for each postorderby => 'menu_order'
automatically respect your custom ordermenu_order
php
$posts = postordercontrol_get_ordered_posts( array(
'post_type' => 'post',
'posts_per_page' => 10,
'post_status' => 'publish',
) );
Method 2: Standard WP_Query
php
$query = new WP_Query( array(
'post_type' => 'post',
'orderby' => 'menu_order',
'order' => 'ASC',
'posts_per_page' => 10,
) );
Method 3: Auto-Apply (Global)
Enable automatic ordering for all frontend queries in the plugin settings.
Taxonomy Ordering
The plugin also supports drag-and-drop ordering for taxonomies:
wp_list_categories()
with orderby => 'meta_value_num'
and meta_key => 'postordercontrol_term_order'
edit_posts
capability can manage orderingmanage_options
(Administrators only) via Settings/wp-content/plugins/post-order-control/
The easiest way is directly in the WordPress admin:
Yes! This plugin uses WordPress's standard menu_order
field, which is supported by most themes. If your theme doesn't automatically use the custom order, you can:
orderby => 'menu_order'
Yes! The plugin supports any public post type. Enable them in the General settings tab.
Yes! Enable taxonomies in the Advanced settings tab, then drag and drop terms in their respective admin pages.
Use the helper function postordercontrol_get_ordered_posts()
or modify your WP_Query to use orderby => 'menu_order'
. See the plugin's "How To" tab for detailed examples.
Yes! Use the Export/Import feature in the Advanced settings tab to backup and restore your ordering data.
menu_order
field integration