[WordPress] 外掛分享: Reorder Terms

首頁外掛目錄 › Reorder Terms
WordPress 外掛 Reorder Terms 的封面圖片
1,000+
安裝啟用
★★★★★
5/5 分(1 則評價)
9 天前
最後更新
問題解決
WordPress 6.5+ v1.1.1 上架:2015-10-03

內容簡介

Reorder Terms 是一款開發者導向的分類項目排序外掛,透過 term meta 而非修改核心資料表的方式,實現依文章類型對分類項目進行彈性排序,需搭配 Reorder Posts 外掛使用。

【主要功能】
• 透過 term meta 自訂分類項目排序
• 可依各文章類型分別排序同一分類法的項目
• 支援階層式分類項目的層級排序
• 作為 Reorder Posts 的附加元件,統一管理排序
• 不修改核心資料表,以自訂查詢實現排序

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Reorder Terms」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

We consider Reorder Terms a developer tool. If you do not know what menu_order or custom queries are, then this plugin is likely not for you. This is an add-on to Reorder Posts and requires Reorder Posts 2.1.0 or greater.

Reorder Terms takes a different approach to term reordering. Instead of modifying core tables to achieve reordering, we do it using term meta per post type.
With the ability to add taxonomies to multiple post types, this method allows you to reorder terms within each post type attached to the same taxonomy.
This plugin treats terms like pages. Each term in a hierarchy has a term order. This allows quick reordering and deep traversing to get the exact terms and order you prefer.
As a result, you can get reordered terms with a query such as:
$query = array(
'orderby' => 'meta_value_num',
'order' => 'ASC',
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'post_order',
'compare' => 'NOT EXISTS'
),
array(
'key' => 'post_order',
'value' => 0,
'compare' => '>='
)
),
'hide_empty' => true,
'parent' => 0
);
$terms = get_terms( 'post_format', $query );
echo '

    ';
    foreach( $terms as $term ) {
    printf( '

  • %s
  • ', esc_html( $term->name ) );
    }
    echo '

';

While admittedly the query isn’t exactly poetry, it’s efficient, and insanely flexible.
Features
Add-on to Reorder Posts, so there is only one place to do all your reordering.
Reorder terms for each taxonomy within each post type. Very flexible.
Spread the Word
If you like this plugin, please help spread the word. Rate the plugin. Write about the plugin. Something 🙂
Development
Development happens on GitHub.
You are welcome to help us out and contribute on GitHub.

延伸相關外掛

文章
Filter
Mastodon