[WordPress] 外掛分享: B7 Multiple Featured Images for Post

WordPress 外掛 B7 Multiple Featured Images for Post 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「B7 Multiple Featured Images for Post」是 2025-03-27 上架。
  • 目前有 50 個安裝啟用數。
  • 上一次更新是 2025-03-28,距離現在已有 335 天。
  • 外掛最低要求 WordPress 5.9 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.2 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

blogvii |

外掛標籤

gallery | post images | featured image | post thumbnail | multiple featured images |

內容簡介

### 總結:
B7 Multiple Featured Images for Post 外掛讓 WordPress 使用者可以超越單一特色圖像的限制,在文章中新增最多三張額外的特色圖像,提供更豐富的視覺呈現。透過主題中的簡單功能呼叫或簡便的 shortcode,輕鬆展示這些圖像。

### 問題與答案:
1. 外掛如何協助使用者超越單一特色圖像的限制?
- 答: 外掛讓使用者可以在文章中新增最多三張額外的特色圖像,提供更豐富的視覺呈現。

2. 外掛是如何工作的?
- 答: 外掛透過在 WordPress 文章編輯畫面中添加一個元素框,讓使用者可以使用標準的 WordPress 媒體上傳器選擇最多三張額外的圖像。這些圖像會被儲存為文章的元數據,並可以在網站前端檢索和顯示。

3. 如何新增多個特色圖像?
- 答: 編輯文章時,在側邊欄找到 "Multiple Featured Images" 元素框,點擊 "Select Image" 按鈕,使用 WordPress 媒體庫選擇最多三張額外的特色圖像,然後保存或更新文章。

4. 如何在前端顯示圖像?
- 答: 在主題的模板檔案中,使用函數 `b7mufeimdisplaymultiplefeatured_images( get_the_ID(), 'medium' );`,替換 'medium' 為所需的圖像大小 (縮圖、中型、大型、完整等)。

5. 如何使用 shortcode 顯示多個特色圖像?
- 答: 在文章內容或小工具中使用 shortcode `[b7_multiple_featured_images]` 顯示多個特色圖像。可以透過參數自訂輸出,如指定圖像大小或文章 ID。

6. 舉例說明 shortcode 的用法?
- 答:
- 基本用法 (縮圖大小,當前文章): `[b7_multiple_featured_images]`
- 指定圖像大小 (中型,當前文章): `[b7_multiple_featured_images size="medium"]`
- 指定文章 ID (縮圖大小,指定文章): `[b7_multiple_featured_images post_id="123"]`
- 同時指定大小和文章 ID (大型,指定文章): `[b7_multiple_featured_images size="large" post_id="456"]`

7. 如何在小工具中使用 shortcode 顯示多個特色圖像?
- 答: 可直接將任何上面的 shortcode 範例貼入 WordPress 文字小工具中,以在側邊欄或其他小工具區域中顯示多個特色圖像。在大多數情況下,建議指定文章 ID 以從特定文章顯示圖像,而不是依賴"當前文章"。

原文外掛簡介

The “B7 Multiple Featured Images for Post” plugin for WordPress allows you to go beyond the single featured image limitation. This plugin empowers you to add up to three additional featured images to your posts, providing a richer visual representation of your content. Display these images on your posts using a simple function call in your theme or via a convenient shortcode.
How does the plugin work?
This plugin extends the functionality of WordPress posts by adding a meta box in the post edit screen. This meta box allows you to select up to three additional images using the standard WordPress media uploader. These images are then stored as post meta data, which can be retrieved and displayed on the front-end of your site.
Usage

Adding Multiple Featured Images: When editing a post, locate the “Multiple Featured Images” meta box in the sidebar.
Click the “Select Image” buttons to choose up to three additional featured images using the WordPress Media Library.
Save or update your post.

Displaying Images on the Frontend:

In your theme’s template files: Use the function b7mufeimdisplaymultiplefeatured_images( get_the_ID(), 'medium' ); in your theme’s template files (e.g., single.php, content.php). Replace 'medium' with your desired image size (thumbnail, medium, large, full, or custom sizes).

Using Shortcode: Use the shortcode [b7_multiple_featured_images] within your post content or widgets to display the multiple featured images.
Shortcode Parameters:
The [b7_multiple_featured_images] shortcode accepts the following optional parameters to customize its output:

size: (Optional) Defines the image size to be displayed.

Possible values: Any registered WordPress image size name (e.g., thumbnail, medium, large, full) or a custom image size name defined by your theme.
Default value: thumbnail if the size parameter is not specified.

post_id: (Optional) Specifies which post’s featured images to display.

Possible values: The ID of a WordPress post.
Default value: If post_id is not specified, the shortcode will display multiple featured images for the current post where the shortcode is used.

Shortcode Usage Examples:
Here are various ways to use the shortcode:

Basic Usage (Default Thumbnail Size, Current Post):
[b7_multiple_featured_images]
This will display the multiple featured images of the current post, using the thumbnail image size for each image.

Specify Image Size (Medium Size, Current Post):
[b7_multiple_featured_images size="medium"]
This will display the multiple featured images of the current post, using the medium image size. You can replace "medium" with other sizes like "large" or "full".

Specify a Post ID (Thumbnail Size, Specific Post):
[b7_multiple_featured_images post_id="123"]
This will display the multiple featured images of the post with ID 123, using the default thumbnail image size. Replace "123" with the actual ID of the post you want to target.

Specify Both Size and Post ID (Large Size, Specific Post):
[b7_multiple_featured_images size="large" post_id="456"]
This will display the multiple featured images of the post with ID 456, using the large image size. Replace "456" with the desired post ID and "large" with your preferred image size.

Using in Widgets: You can directly paste any of the above shortcode examples into a WordPress Text widget to display multiple featured images in your sidebar or other widget areas. Remember that in most cases in widget areas, you would likely want to specify a post_id to display images from a specific post, rather than relying on “current post”.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「B7 Multiple Featured Images for Post」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.0 | trunk |

延伸相關外掛(你可能也想知道)

  • Post Thumbs 》Post thumbs 是一個外掛,它能夠通過在文章中搜索圖像,將每篇文章的縮略圖列出來。。
  • Attach Post Images 》這款外掛不同於傳統的方式,在文章內容中插入圖片(附件),這款外掛讓您以一種方式附加圖片到文章中,, 可以讓您控制這些圖片在您的佈景主題中的顯示方式。,...。
  • Modal Post Images 》Modal Posts Images 外掛會為所有 WordPress 文章 entry-content 類別下的圖片增加彈跳視窗的效果。此外掛會呼叫 entry-content 類別下的所有圖片,並添加功...。
  • real.PostImages 》以下是中文翻譯:, 此外掛可讓您為文章附加額外的圖片(在獨立區域中,作為自訂欄位)。, 若要使用函數get_post_images($post_id)取得包含有關文章圖片資訊的...。
  • Extra Post Images 》此外掛可讓您在 WordPress 安裝上將多張圖片附加到任何文章格式。, 特點, , 透過使用簡碼 [extra-images],可以在文章或頁面中顯示您的圖片,圖片可以以列表...。
  • Post Attachment Sizes 》這個外掛在 wp-admin 文章編輯畫面提供了一個額外可排序的欄位,讓你可以依附加在文章中所有附件的檔案大小來排序文章。如果你的文章有 10 張圖片附件,顯示...。

文章
Filter
Apply Filters
Mastodon