[WordPress] 外掛分享: Simple Taxonomy Ordering

首頁外掛目錄 › Simple Taxonomy Ordering
WordPress 外掛 Simple Taxonomy Ordering 的封面圖片
20,000+
安裝啟用
★★★★
4.9/5 分(28 則評價)
1092 天前
最後更新
問題解決
WordPress 4.4+ v2.3.4 上架:2015-12-13

內容簡介

使用這個簡單易用且直觀的拖放介面,將您網站上所有的分類體系排序安排。這個外掛適用於 WordPress 核心的分類體系,包括「分類」和「標籤」,以及您所創建的任何自訂體系。

啟用外掛,將您的分類體系啟用於設定頁面,然後將其拖曳到所需的位置即可。簡單到極點。

在網站前端,您的分類體系將按照儲存在後台的順序顯示。

該外掛需要 WordPress 4.4 或更高版本,因為它使用了分類體系元資料。

查詢使用說明

如果您想查詢分類體系(例如使用 WP_Query 或 get_terms() 函數),並希望按照外掛指定的順序返回它們,您需要在呼叫中添加 tax_position 參數。例如:'meta_key' => 'tax_position' 和 'orderby' => 'tax_position'。感謝 GitHub 上的 @certainlyakey 提供這個提示。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.3.4) 或搜尋安裝

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

原文外掛簡介

Order all of the taxonomy terms on your site with a simple to use, intuitive drag and drop interface. The plugin works for WordPress core taxonomies — Categories and Tags — and any custom taxonomies you have created.
Activate the plugin, enable your taxonomy on the settings page, and drag and drop the taxonomies into the desired position. It couldn’t be easier.
On the front end of the site your taxonomy terms will display in the order set in the dashboard.
Requires WordPress 4.4 or later due to the use of the term meta.
Query Usage

If you’re trying to query for taxonomy terms (e.g. using WP_Query or functions like get_terms()), and you’d like them to be returned in the order specified by the plugin, you need to add the tax_position parameter in your call. For example: 'meta_key' => 'tax_position' and 'orderby' => 'tax_position'. Thanks to @certainlyakey on GitHub for pointing this out.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon