前言介紹
- 這款 WordPress 外掛「Primary Cat」是 2021-01-04 上架。
- 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
- 上一次更新是 2023-08-19,距離現在已有 624 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
bhadaway |
外掛標籤
category | categories | breadcrumbs | category slug | primary category |
內容簡介
設置您的文章的主要類別... 然後對其進行操作。
為什麼我要(primary category)主要類別?
當您在 WordPress 上發布文章時,通常會給予文章多個類別。如果您的網站沒有限定每篇文章只能有一個類別,當 WordPress 自動選擇代表文章的類別時,這可能會造成顯示上的問題,因為您很可能需要選擇一個重要的主要類別,而不是 WordPress 自動為您選擇的類別。
例如,您的博客主題是有關動物的,您發布了一篇名為「為什麼狗愛水而貓卻討厭水?」的文章,並將類別分配為「貓咪」、「狗狗」和「寵物」。
預設情況下,WordPress 可能會顯示「貓咪」作為文章的代表類別,但是既然這篇文章相同地涵蓋了貓和狗,那麼「寵物」可能更適合作為主要類別。
這個外掛允許您有效地解決此類問題,不管是為了顯示、結構、組織、SEO,還是所有前述目的。
主要類別(primary category)有什麼用途?
[primary-cat]
您可根據自己的需要進行創意運用,這裡是一些我想到的例子:
您可以在文章標題上方呈現文章所屬的主要類別(透過在您的主題代碼、子主題或自訂功能外掛中加入 ,這樣可以以某種美觀的方式樣式化,例如使用CSS .primary-cat)。 許多博客、新聞和雜誌網站都使用這個功能。
如果您使用自訂 /%category%/%postname%/ 永久連結結構,可以讓文章網址中顯示適當的slug。
在您的網站上使用面包屑導航(透過使用shortcode [primary-bread]),這樣有助於提高用戶體驗 (可以使用CSS #breadcrumbs進行樣式設定),並在某種程度上提高 SEO。
原文外掛簡介
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 環境。
延伸相關外掛(你可能也想知道)
No Category Base (WPML) 》這個外掛的名稱就像它所說的,可以完全移除類別固定基底(Category Base)的強制要求,例如 mysite.com/category/my-category/ 將會變成 mysite.com/my-categ...。
WP Remove Category Base 》這實際上是從 WordPress SEO 過時的程式碼,加上了一些小改進。。
WP Remove Category prefix 》這實際上是 WordPress SEO 的廢棄程式碼,加上了一些小的改進。。