[WordPress] 外掛分享: Category Featured Images Extended

首頁外掛目錄 › Category Featured Images Extended
WordPress 外掛 Category Featured Images Extended 的封面圖片
500+
安裝啟用
★★★★
4.4/5 分(7 則評價)
3113 天前
最後更新
問題解決
WordPress 3.5.0+ PHP 5.6+ v1.52 上架:2016-09-22

內容簡介

Category Featured Images Extended (CFIX) 可以確保當佈景主題、模板和外掛程式呼叫文章、文章分類頁面、小工具或網站的其他元素時,它們總是會顯示縮略圖或特色圖片。

如果文章已經為特定文章設置了特色圖片,就會使用它。如果沒有為文章設置特色/縮略圖像,CFIX 將首先從文章的某個類別或標籤中提供圖像。如果可用,它將使用 Yoast SEO 「主要」類別圖像。如果找不到類別或標籤圖像,該外掛程式將尋找具有圖像的父類別。最後,如果找不到任何相關聯的文章、類別、標籤或父類別圖片,就可以使用一個特定的後備標籤或類別圖片,如果設置為「全域後備」,就可以使用它。

本外掛程式最初建立於 Mattia Roccoberton 的「Category Featured Images」(CFI)基礎上。如果您已經使用了 CFI,當您安裝這個擴展版本時,已經保存的分類圖像設置將被保留並複製。

在 CFI 中

如果文章沒有自己的特色圖像,將使用可用的分類特色圖像。
如果一個文章屬於多個有特色圖像的分類,將使用第一個可用的分類圖像。
如果文章中沒有分類有特色圖像,分類的父分類將使用特色圖像(如果有)。

在 CFIX 中

(1.2 版新增)您也可以設置標籤圖像。
您可以指定不使用圖像的分類或標籤:當許多文章使用相同的通用類別時,這個功能可能會有所幫助,您希望強制使用更具體的圖像。
您還可以指定類別或標籤,它們的圖像將作為最後的後備圖像使用,當沒有正常的特色圖像、類別圖像或父類別圖像可用時。這個功能可能特別有用,特別是如果您的安裝包含許多頂級類別,並且您希望為每個類別找到圖像,或者您還沒有這樣做。 (結合這個功能和上一個功能的一種方法是為避免和最後的後備都指定相同的類別:外掛程式將始終尋找更具體且不可避免的類別,但否則將退回到更一般的類別。)
當文章有多個類別或標籤圖像可用時,將使用最近添加的類別或標籤圖像。 (這種行為可以通過鉤子或過濾器進行修改。)如果可用,將使用 Yoast SEO 主要類別的圖像。

注意:如果從類別特色圖像升級,請停用它以避免衝突

為了進一步預防,請在您確定 CFIX 正常工作之前不要完全卸載 CFI。

*在 WordPress 中,「縮略圖」和「特色」這兩個詞用得有些混淆,即使許多特色/縮略圖像將以比縮略圖更大的尺寸顯示。

其他資訊
仍需更新的內容

縮略圖和特色圖像後備:具有所有 CFIX 功能以及使用其他圖像(從文章內容或上傳)作為後備用途的選項的外掛程式。
補充實用工具:處理縮略圖「錯誤正面診斷結果Positive False」(一些已導入或恢復的存檔的問題)或刷新不良縮略圖數據。

請查看CFIX首頁以獲得其他背景、示例、文件和使用技巧...或與作者聯繫以尋求幫助。

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Category Featured Images Extended」→ 直接安裝(推薦)

原文外掛簡介

Category Featured Images Extended (CFIX) can ensure that posts, category archive pages, widgets and other elements of your site will always display a thumbnail or featured image* when called upon to do so by themes, templates, and plugins.
If a featured image has been individually set for a post, it will be used. If a featured/thumbnail image has not been set for a post, CFIX will first try to supply an image from one of the post’s categories or tags. It will use a Yoast SEO “Primary” Category’s image if available. If no category or tag image is found, the plugin will look for a parent category with an image. Finally, if no linked or related post, category, tag, or parent category image is found, a particular fallback tag or category image can be used if set as “global fallback.”
This plugin was initially based on “Category Featured Images” (CFI) by Mattia Roccoberton. If you already have been using CFI, when you install this extended version, your already saved category image settings will be preserved and copied.
In CFI

If a post does not have its own featured image, a category featured image will be used if available.
If a post has more than one category with a featured image, the first available category image will be used.
If none of the post’s categories has a featured image, a parent category’s featured image will be used if available.

In CFIX

(New since 1.2) You can also set tag images.
You can designate categories or tags whose images will be avoided: This feature may be helpful when numerous posts use the same general category, and you wish to force the use of a more specific image.
You can also designate a category or tag whose image will be used as a last fallback when no regular featured image, category image, or parent category image is available. This feature may be helpful especially if your installation features many top-level categories, and you either do not wish to find images for each and every one, or you just haven’t done so yet. (One way to combine this feature and the previous one would be to designate the same category for both avoidance and last resort: The plug-in would always look for a more specific, not-to-be-avoided category, but fall back to the more general category otherwise.)
When a post has multiple category or tag images available, either the most recently added category or tag will be used. (This behavior is modifiable via hook or filter). A Yoast SEO Primary Category’s image will be used if available.

NOTE: IF UPGRADING FROM CATEGORY FEATURED IMAGES, DE-ACTIVATE IT TO AVOID CONFLICTS
As a further precaution, do not uninstall CFI completely until you are sure that CFIX is working as expected for you.
* The terms “thumbnail” and “featured” are used somewhat interchangeably in WordPress, even though many featured/thumbnail images will be displayed at much larger than thumbnail size.
Additional Info
Still to Come

Thumbnail and Featured Image Fallback: A plugin with all CFIX capabilities as well as options to use other images (from post content or as uploaded) for fallback purposes.
Supplementary Utilities: To handle thumbnail “false positives” (a problem for some imported or restored archives) or flush bad thumbnail data.

Check the CFIX home pages for additional background, examples, documentation, and usage tips… or to contact the developer directly.
Thanks!
All gratitude to Mattia Roccoberton for the basic code for his original Categorey Featured Images plug-in, which I had been using for years before I got around to extending it. Thanks to John Prusinski for recommending the Yoast SEO modification, encouraging me to implement it, and even throwing in a tip via Paypal! Thanks also to all of the developers and everyday code-hackers, far too numerous to name, upon whose work I have depended.

延伸相關外掛

文章
Filter
Mastodon