
前言介紹
- 這款 WordPress 外掛「Primary Cat」是 2021-01-04 上架。
- 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
- 上一次更新是 2026-01-21,距離現在已有 35 天。
- 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
webguyio |
外掛標籤
category | categories | breadcrumbs | category slug | primary category |
內容簡介
設置您的文章的主要類別... 然後對其進行操作。
為什麼我要(primary category)主要類別?
當您在 WordPress 上發布文章時,通常會給予文章多個類別。如果您的網站沒有限定每篇文章只能有一個類別,當 WordPress 自動選擇代表文章的類別時,這可能會造成顯示上的問題,因為您很可能需要選擇一個重要的主要類別,而不是 WordPress 自動為您選擇的類別。
例如,您的博客主題是有關動物的,您發布了一篇名為「為什麼狗愛水而貓卻討厭水?」的文章,並將類別分配為「貓咪」、「狗狗」和「寵物」。
預設情況下,WordPress 可能會顯示「貓咪」作為文章的代表類別,但是既然這篇文章相同地涵蓋了貓和狗,那麼「寵物」可能更適合作為主要類別。
這個外掛允許您有效地解決此類問題,不管是為了顯示、結構、組織、SEO,還是所有前述目的。
主要類別(primary category)有什麼用途?
[primary-cat]
您可根據自己的需要進行創意運用,這裡是一些我想到的例子:
您可以在文章標題上方呈現文章所屬的主要類別(透過在您的主題代碼、子主題或自訂功能外掛中加入 <?php echo do_shortcode( '[primary-cat]' ); ?>,這樣可以以某種美觀的方式樣式化,例如使用CSS .primary-cat)。 許多博客、新聞和雜誌網站都使用這個功能。
如果您使用自訂 /%category%/%postname%/ 永久連結結構,可以讓文章網址中顯示適當的slug。
在您的網站上使用面包屑導航(透過使用shortcode [primary-bread]),這樣有助於提高用戶體驗 (可以使用CSS #breadcrumbs進行樣式設定),並在某種程度上提高 SEO。
原文外掛簡介
💬 Ask Question | 📧 Email Me
Set a primary category for your posts… and then do stuff with it.
Why would I want a primary category?
Out of the box, WordPress allows you to assign multiple categories to a post. Unless you’re enforcing a strict one-category-per-post-only rule for your website, this can be a problem now for displaying the most important category for your respective posts, as opposed to WordPress automatically selecting it for you.
Let’s say that your blog is about animals, and you publish an article titled “Why Do Dogs Love Water and Cats Hate It?” with the categories: Cats, Dogs, and Pets assigned to it.
By default, anywhere that WordPress might display a single category to represent the post, it’s probably going to display Cats by default, but since the post is equally about both cats and dogs, maybe the more general Pets category would be more appropriate.
This plugin allows you to accomplish that, whether it’s for presentational, structural, organizational, SEO, or all of the above purposes.
In what ways can I utilize a primary category?
[primary-cat]
In any creative way that you can imagine, but here are some examples I thought of:
To present the main category that the post belongs to above its title (by adding in your theme code, child theme, or custom functions plugin), in some aesthetic way (which can be styled with CSS .primary-cat). Lots of blog, news, and magazine sites have this feature.
To have the appropriate slug in your post URLs if you’re using the custom /%category%/%postname%/ permalink structure under Settings > Permalinks.
To have breadcrumbs (by using the shortcode [primary-bread]) on your site for user-friendliness (which can be styled with CSS #breadcrumbs), and can in turn, also improve SEO.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Primary Cat」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Breadcrumb NavXT 》Breadcrumb NavXT 是受歡迎的 WordPress 外掛 Breadcrumb Navigation XT 的後繼者,從頭開始編寫以比其前輩更好。此外掛可為您的 WordPress 網誌或網站生成定...。
Flexy Breadcrumb 》PressTigers 的 Flexy Breadcrumb 是一個簡單而強大的麵包屑導覽系統外掛,適用於 WordPress 網站。使用此外掛,您可以透過 [flexy_breadcrumb] 短碼在網站的...。
Breadcrumb – Breadcrumb for WooCommerce and Custom Post Types 》Breadcrumb 是一個輕量級的外掛程式,可顯示面包屑導航於您的 WordPress 網站,易於自訂和更改面包屑的風格。您可以使用過濾器鉤子和操作鉤子來重寫程式,而...。
Breadcrumbs Divi Module 》此外掛為 Divi Builder 新增了一個麵包屑模組。啟用此外掛之後,你的模組清單中會多一個名為 "Breadcrumbs" 的模組。你可以使用這個模組在 Divi Builder 中任...。
Breadcrumb Trail 》Breadcrumb Trail 是 WordPress 中功能最強大和最先進的面包屑菜單系統之一。它最初是一個基本博客的小腳本,但現在已發展成為一個可以處理幾乎任何網站設置...。
Breadcrumbs for WooCommerce 》WooCommerce Breadcrumbs 是一個簡單的 WordPress 外掛,允許您重新設計 WooCommerce 的麵包屑導覽列。同時,此外掛還提供了完全禁用麵包屑的功能,讓其不再...。Catch Breadcrumb 》Catch Breadcrumb 是一個功能豐富的 WordPress 麵包屑導覽外掛,可在您的網站中無縫添加麵包屑導覽。此外掛提供自定義選項,讓您可以根據您的網站進行調整設...。
breadcrumb simple 》透過簡易短碼,複製並貼上這個短碼來檢視面包屑 [breadcrumb_simple]。, 功能特色, , 容易安裝, 透過短碼簡單易用, , 需求, 此外掛需要 PHP 5 或 PHP 7 和 Wo...。RDFa Breadcrumb 》RDFa Breadcrumb 提供了連結回到使用者瀏覽到現在頁面的每一個前一頁,或者是在階層式網站結構中,回到現在頁面的父層頁面。, 此外掛提供了一個名為 rdfa_bre...。
WPSSO Schema Breadcrumbs Markup 》, 任何外掛中最全面的綱頁面包屑架構資料標記。, 為文章、頁面、自訂文章型別、分類、標籤、自訂分類、搜尋結果和日期檔案頁面添加綱頁面包屑架構資料標記。,...。
Menu Breadcrumb 》面包屑通常是从页面结构中生成的,但在使用自定义文章类型的世界中,它并不总是有效。Menu Breadcrumb 插件利用 WordPress 菜单栏来生成基于当前页面的面包屑...。Instant Breadcrumbs 》Instant Breadcrumbs 是一款 WordPress 外掛,它能在你的網站主導覽選單中添加一條麵包屑路徑,而不需要編輯佈景主題。 在站點上加入麵包屑路徑不僅可使訪客...。
Genesis Simple Breadcrumbs 》Genesis Simple Breadcrumbs 會在 Genesis 選單中新增一個項目,讓使用者可以輕鬆更改 Genesis Breadcrumbs,包括:, , 首頁文字, 導覽分隔符號, 清單分隔符...。
WPshore Breadcrumbs 》麵包屑是一種網站導航技術。透過麵包屑,使用者可以看到當前頁面在網站階層結構中的位置。, 它可以讓使用者重新追溯他們的步驟。, 透過此外掛,您可以在 Word...。SB Breadcrumbs 》SB Breadcrumbs 是一個能夠為網站增加面包屑導航的 WordPress 外掛。使用方便,且可自定風格。, 使用方法, 在欲顯示面包屑導航的位置,加入程式碼 <?php s...。
