[WordPress] 外掛分享: RS Simple Category Selector

首頁外掛目錄 › RS Simple Category Selector
10+
安裝啟用
尚無評分
4926 天前
最後更新
問題解決
WordPress 3.2+ v1.0 上架:2012-04-18

內容簡介

如果您在一篇文章中有超過一個關聯的類別,您要怎樣區別哪個類別優先呢?此外掛可讓您在文章編輯頁面上將某個類別推高為主要類別。

這些資料會儲存在文章的 meta 中以便日後使用。很快我會加入一些簡單的函數,讓您可以在前端取得主要類別。

使用方法

在文章內可使用縮短代碼 [rs_print_main] 列印出主要類別的標題。
在佈景主題內可使用 rs_get_main_category_id( $post_id ) 回傳(而非列印)主要類別的 ID。

外掛標籤

開發者團隊

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

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

原文外掛簡介

If you have more than one category associated with a post, how do you tell which category takes precedence? This plugin gives you the ability to promote the category to the main one on the post edit page.
This gets stored in post meta for later use. Soon, I will add some simple functions that will allow you to get the main category on the front end.
Use

You can use the shortcode [rs_print_main] inside the post to print out the category title.
In the theme, you can use rs_get_main_category_id( $post_id ) to return (not print) the id of the main category.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon