[WordPress] 外掛分享: Post Order Control – Drag & Drop Reorder Posts, Pages & Categories

首頁 › 外掛目錄 › Post Order Control – Drag & Drop Reorder Posts, Pages & Categories
WordPress 外掛 Post Order Control – Drag & Drop Reorder Posts, Pages & Categories 的封面圖片
10+
安裝啟用
★★★★★
5/5 分(1 則評價)
19 天前
最後更新
0%
問題解決
WordPress 5.0+ PHP 7.4+ v1.0.1 上架:2025-10-03

內容簡介

總結:Post Order Control 提供直觀的拖放界面,可在 WordPress 管理員中直接重新排序文章、頁面和自訂文章類型。此外,這個外掛考慮了可存取性和主題兼容性,並使用 WordPress 的標準 menu_order 欄位以確保最大的相容性。

問題與答案:
1. Post Order Control 提供哪些主要功能?
- 直接在 WordPress 管理員中拖放排序文章/頁面清單
- 使用內建 menu_order 欄位以確保最大的主題相容性
- 具有分頁設定和全面文件的現代管理介面
- 可針對分類、標籤和自訂分類排序
- 自動套用設定,可在前端自動使用自訂排序
- 使用 REST API 進行提取/保存排序,並具有 nonce 和能力檢查
- 提供 postordercontrol_get_ordered_posts() 輔助功能,方便主題整合
- 提供匯出/匯入功能,可備份排序數據
- 具有鍵盤導航和螢幕閱讀器支持的可存取設計
- 內含 POT 檔案,準備好進行國際化

2. 這個外掛如何運作?
- 透過 WordPress 的內建 menu_order 欄位來儲存文章排序
- 拖放更新文章的 menu_order 值
- 主題查詢使用 orderby => 'menu_order' 可自動尊重您的自訂排序
- 不需要自訂數據庫表格或複雜查詢
- 與支援 menu_order 的任何主題或外掛完全相容

3. 如何與主題整合?
- 提供多種整合主題的方法:
- 方法一:輔助功能(推薦)
- 方法二:標準 WP_Query
- 方法三:自動套用(全域)

4. 這個外掛的隱私政策如何?
- 這個外掛不會收集、儲存或傳輸任何個人數據,所有排序數據均以 WordPress 的標準 menu_order 欄位和分類 meta 儲存在本地 WordPress 數據庫內。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Post Order Control – Drag & Drop Reorder Posts, Pages & Categories」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Post Order Control lets you change the order of posts, pages and custom post types by dragging rows in the normal WordPress admin lists. Drop a row and the new order is saved. There is no extra screen to learn and nothing to configure before your first drag.
The order is stored in WordPress’s own menu_order field, the same field core uses for page order. Themes, page builders and queries that sort by “menu order” pick up your order with no extra code. Turn on Auto Apply Sort and your home page, archives and search results follow it too.
You can also put categories, tags and custom taxonomy terms in any order you like.
What you can reorder

Posts: put a featured or evergreen post at the top of your blog.
Pages: set the order of page lists such as the Page List block. Parent and child pages keep their structure.
Custom post types: portfolio projects, team members, services, testimonials, FAQs, events, products or any other public post type.
Categories, tags and custom taxonomies: control the order of terms in your lists and navigation.

Features

Drag and drop in the lists you already use: All Posts, All Pages, any custom post type list and the category or tag screens.
Saves on drop: no “save order” button. A notice confirms the order was saved.
Works on every page of the list: reorder page 2, a filtered view or search results and every other post keeps its place.
Auto Apply Sort: show the custom order on the home page, archives and search results without editing your theme.
Admin order: the admin lists show your custom order. Click a column such as Date or Title to sort by it instead.
Choose post types and taxonomies: turn ordering on only where you need it.
Permission aware: by default anyone who can edit posts can reorder the posts they are allowed to edit. You can limit reordering to administrators.
Export, import and reset: back up your ordering as JSON and restore it on the same site.
Developer friendly: a helper function, a REST API endpoint and standard menu_order queries.
Lightweight: no custom database tables, and scripts load only on the screens that use them.
Translation ready: every admin and JavaScript string can be translated.

Show the order on your site
Option 1: Auto Apply Sort (no code).
Turn on Settings → Post Order Control → Auto Apply Sort. The home page, archives and search results of the enabled post types then use your order.
Option 2: Sort by menu order in your own query.
Blocks, widgets and custom queries that run their own query need orderby set to menu_order:
$query = new WP_Query( array(
'post_type' => 'portfolio',
'orderby' => 'menu_order',
'order' => 'ASC',
) );

Many page builder post widgets have a “Menu order” sort option. Choose it to use your order.
Option 3: Helper function.
$posts = postordercontrol_get_ordered_posts( array(
'post_type' => 'post',
'posts_per_page' => 10,
) );

Show categories and tags in your order
wp_list_categories( array(
'orderby' => 'meta_value_num',
'meta_key' => 'postordercontrol_term_order',
'order' => 'ASC',
) );

The same arguments work with get_terms() for tags and custom taxonomies.
For developers

Order is stored in menu_order (posts) and the postordercontrol_term_order term meta (terms).
REST API: GET /wp-json/postordercontrol/v1/order/{post_type} returns the post IDs in order. POST the same route with {"ids": [...]} to save a new order. Both need a logged-in user with permission to reorder.
Saving updates menu_order directly, so post content and modified dates are left untouched.

Privacy
Post Order Control does not collect, store or send any personal data. Ordering is saved in your own database.

延伸相關外掛

文章
Filter
Mastodon