[WordPress] 外掛分享: Display Featured Image for Genesis

首頁外掛目錄 › Display Featured Image for Genesis
WordPress 外掛 Display Featured Image for Genesis 的封面圖片
1,000+
安裝啟用
★★★★
4.9/5 分(33 則評價)
858 天前
最後更新
問題解決
WordPress 5.2+ PHP 7.4+ v3.2.3 上架:2014-09-22

內容簡介

本外掛以巧妙的方式呈現貼文和頁面的精選圖片,不僅重複使用文章內容中的圖片,更能智慧地使用適當的大圖片。根據你上傳的圖片,該外掛會執行以下操作:

- 如果圖片寬度超過網站的大型媒體設定,則將圖片顯示為橫幅(螢幕寬度)圖片。
- 如果圖片寬度大於媒體設定的中等值,並且小於或等於大型媒體設定,則將圖片居中並顯示在文章/頁面內容上方,寬度不超過內容的寬度。
- 如果精選圖片的寬度小於或等於中等媒體設定,則不會顯示任何圖片。
- 如果上傳了預設的精選圖片,則將其顯示為橫幅圖片。

此外,該外掛也讓你能夠選擇將預設精選圖片套用在未設定其精選圖片、精選圖片過小或是應用於分類和標籤等分類法規定的內容頁上。你可以在「外觀 > 展示 Genesis 精選圖片設定」中設定默認精選圖片、自訂分類法預設精選圖片和自訂文章類型精選圖片。

此外,你也可以將每個貼文的精選圖片添加到 RSS 訂閱中。你可以在「設定 > 閱讀」中進行相關設定。

顯示Genesis精選圖片功能內建一些簡單的樣式,但是作者經過精心設計,盡可能地使其保持簡約風格,避免過度覆蓋原有佈景主題的樣式。

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.2.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Display Featured Image for Genesis」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin takes a different approach to how we use and display featured images for posts and pages. Instead of simply reusing an image which already exists in the post/page content, the plugin anticipates that you will want to use lovely large images for your featured images, but to do so intelligently. Depending on what you upload, the plugin will:

display the image as a banner (screen width) image if the image is wider than your site’s Large Media Setting.
display the image above your post/page content, centered and up to the width of the content, if your image is larger than your Medium Media Setting, and less than or equal to your Large Media Setting.
display nothing if your featured image width is less than or equal to your Medium Media Setting.
display a default featured image as a banner image if one is uploaded.

More words at my site.
Note: although this plugin requires the Genesis Framework by StudioPress or child themes, it is not an official plugin for this framework and is neither endorsed nor supported by StudioPress.
An Image for Every Page
Display Featured Image for Genesis allows you to select a default, or fallback, Featured Image, which will be used if a post/page does not have a Featured Image set, or if the post/page’s Featured Image is too small (smaller than your medium image setting), and on archive and taxonomy pages. You may set the Default Featured Image under Appearance > Display Featured Image Settings.
You may set a Featured Image for each term within a taxonomy (categories, tags, and any taxonomy for custom post types). This image will be used on taxonomy archives, and as a fallback image for posts within that taxonomy if no featured image exists (or if the featured image is too small). If a post is assigned to multiple terms and has no featured image of its own, the most used term which has a featured image assigned will be the one used.
If your site uses Custom Post Types, you can set a Featured Image for each Post Type on the main Display Featured Image for Genesis settings page. If your single post within this type does not have a featured image, the Post Type Featured Image will be used as a fallback.
Add Your Featured Image to Your RSS Feed
Now you can add the Featured Image from each post to your RSS feed. This is an optional setting and applied intelligently:

if your feed is set to output the full text, the Featured Image will be added to the beginning of your post content as a full width image.
if your feed is set to output only the summary of your content, the Featured image will be added to the beginning of your summary as a thumbnail, aligned to the left.

You can check/change your feed settings on your site’s Settings > Reading page.
If you are already inserting your Featured Image into your feed through another function or plugin, you’ll want to remove that before activating this feature; otherwise you will have two copies of the image added to your feed! If you are using Send Images to RSS, don’t worry about it. I’ve made sure these two plugins coexist happily.
Simple Styling
Display Featured Image for Genesis has some styling built in but I have intentionally tried to keep it minimal. All styling is for the banner image options, as the large options seem pretty straightforward. Stying for titles are largely inherited from your theme–for example, the title will use the same size and font for your page titles, whether you are using a Featured Image or not. Some styles you can incorporate into your own theme:

.has-leader applies to any page using a leader/banner image. Applies to the whole page.
.big-leader the container which holds the leader/banner image and the post/page Title and excerpt or description.
.featured-image-overlay style appended to the post/page title if Move Excerpts option is not selected (default).
.excerpt (for single posts/pages) and .archive-description (for archives) are styled as a unit. These are the containers for the post/page/archive/taxonomy title and description if the Move Excerpts option is selected.
.featured is appended to the large image output directly above the post/page content.

延伸相關外掛

文章
Filter
Mastodon