
內容簡介
此外掛可在頁面、文章及自訂文章類型中,動態地加入多個「特色圖片」或「多個文章縮圖」功能。使用此外掛,您可以無需編寫任何程式碼,便可以將任意數量的特色圖像加入。這些特色圖片可以透過不同的佈景主題函數來取用。
總覽
動態特色圖片(Dynamic Featured Image)可選擇在文章或頁面中增加「多個特色圖片」功能。
當您使用其他外掛、文章縮圖或輪播工具時,此功能尤其有用。
為何只限制自己使用一個特色圖片呢?加入多個特色圖片可以做更多的事情喔!
DFI 允許您在每篇文章或頁面中添加不同數量的特色圖像,這些圖像可以透過不同的佈景主題函數來取用。
關於支援的說明:我們樂意幫助您解決問題,但由於 WordPress.org 的支援論壇只有不時檢查,所以請勿過早設定期望。
如何操作?
1. 安裝成功後,進入文章或頁面的「新增」或「編輯」頁面,您會發現有第二個特色圖片的方塊出現。
2. 按下「選擇特色圖片」按鈕,從 「動態特色圖片 - 媒體選擇器」彈出視窗中選擇所需圖片,然後點擊「設置為特色圖片」。
3. 點擊「新增」以新增特色圖片,或使用「刪除」連結以刪除特色圖片方塊。
4. 您可以在佈景主題中使用函數$dynamic_featured_image->get_featured_images([$postId (選擇性)])來取得這些圖片。(詳細資訊請點擊此處)
5. 資料庫中的回傳形式如下:
有多個結果的陣列
0 =>
有特定數值的陣列
'thumb' => 字串 'http://your_site/upload_path/yourSelectedImage.jpg'(長度=50)
'full' => 字串 'http://your_site/upload_path/yourSelectedImage_fullSize.jpg'(長度=69)
'attachment_id' => 字串 '197'(長度=3)
1 =>
有特定數值的陣列
'thumb' => 字串 'http://your_site/upload_path/yourSelectedImage.jpg'(長度=50)
'full' => 字串 'http://your_site/upload_path/yourSelectedImage_fullSize.jpg'(長度=69)
'attachment_id' => 字串 '198'(長度=3)
2 => ...
資源
1. 詳細資料.
2. StackOverflow 標籤.
MultiSite 資訊
您可以使用「網路啟用」將此外掛啟用於單一安裝的所有網站,但僅能在網路管理員網站中使用,而無法在其他地方使用。
「啟用」功能會將此外掛啟用於您目前所在的網站,因此使用者可以自由在任何網誌中啟用或停用此外掛。
在從「網路」中刪除此外掛時,請確保它在 WordPress 網站的所有安裝中被禁用。
貢獻的方式
如果您希望檢查代碼並為此外掛做出貢獻,請加入我們的 GitHub。
歡迎透過「Pull requests」、「Issues」以及其他外掛推薦,為我們做出貢獻!
外掛標籤
開發者團隊
原文外掛簡介
Dynamically adds multiple featured image or multiple post thumbnail functionality to your page, posts and custom post types. This plugin provides you an interface to add any number of featured image as you want without writing a single line of code. These featured images can then be collected by the various theme functions.
Overview
Dynamic Featured Image enables the option to have MULTIPLE featured images within a post or page.
This is especially helpful when you use other plugins, post thumbnails or sliders that use featured images.
Why limit yourself to only one featured image if you can do some awesome stuffs with multiple featured image?
DFI allows you to add different number of featured images to each post and page that can be collected by the various theme functions.
A NOTE ABOUT SUPPORT: We’re here to help troubleshoot bugs, but please don’t set expectations early as the support forums at WordPress.org are only checked once in a while.
How it works?
1. After successfull plugin activation go to add or edit page of posts or pages and you will notice a box for second featured image.
2. Click Set featured image, select required image from “Dynamic Featured Image – Media Selector” popup and click Set Featured Image.
3. Click on Add New to add new featured image or use Remove link to remove the featured image box.
4. You can then get the images by calling the function $dynamic_featured_image->get_featured_images([$postId (optional)]) in your theme. (Click here for details)
5. The data will be returned in the following format.
array
0 =>
array
'thumb' => string 'http://your_site/upload_path/yourSelectedImage.jpg' (length=50)
'full' => string 'http://your_site/upload_path/yourSelectedImage_fullSize.jpg' (length=69)
'attachment_id' => string '197' (length=3)
1 =>
array
'thumb' => string 'http://your_site/upload_path/yourSelectedImage.jpg' (length=50)
'full' => string 'http://your_site/upload_path/yourSelectedImage_fullSize.jpg' (length=69)
'attachment_id' => string '198' (length=3)
2 => ...
Resources
1. Detail Documentation.
2. StackOverflow Tag.
MultiSite Info
You can use Network Activate to activate plugin for all sites on a single install. It is only available on the Network admin site not anywhere else.
Simple Activate activates for the site you are currently on. These will be permitted to be activated or deactivated on ANY blog.
While deleting the plugin from the Network be sure that the plugin is deactive in all installation of your WordPress network.
Contribute
If you’d like to check out the code and contribute, join us on Github.
Pull requests, issues, and plugin recommendations are more than welcome!
