
內容簡介
此外掛會在每個類別旁添加單選框(即使您新增了新的類別),以便您可以選擇您的文章的主類別**。選擇主類別並更新文章後,此資料將保存到一個具有「primary_category」meta key 的自訂欄位中。
若要顯示具有特定主類別的所有文章列表,請使用簡碼 [primary-category name=”CATEGORY NAME” post_type=”POST TYPE”],其中 CATEGORY NAME 是您要顯示的主類別名稱,POST TYPE 是自訂文章類型名稱。 如果沒有指定名稱,該簡碼將預設顯示所有主類別為「未分類」的文章或圖像。
外掛標籤
開發者團隊
原文外掛簡介
This plugin adds radiobuttons near every category (even if you add a new category) so you can choose the primary category of your post **. Selecting a primary category and updating the post saves this data into a custom field with a meta key of “primary_category”.
To display a list of all posts with a particular primary category, use the shortcode [primary-category name=”CATEGORY NAME” post_type=”POST TYPE”] where CATEGORY NAME is the name of the primary category you wish to display and POST TYPE is the custom post type name. If a name is not specified, the shortcode will default to all posts with “uncategorized” set as the primary category. images or post.
