[WordPress] 外掛分享: Reorder Entry Images

首頁外掛目錄 › Reorder Entry Images
WordPress 外掛 Reorder Entry Images 的封面圖片
100+
安裝啟用
★★★★
4.8/5 分(6 則評價)
3274 天前
最後更新
問題解決
WordPress 3.4+ v1.0.8 上架:2013-07-16

內容簡介

此外掛可以幫助您手動重新排序或排序貼文、自訂貼文類型或網頁所附加的圖片。安裝並啟用後,您可以選擇要在哪個貼文類型或網頁使用此功能。該特定貼文或網頁所附加的所有圖片將會列在管理員的貼文編輯頁面上。然後,您可以拖放圖片以您想要的方式進行排序。

這將僅影響上傳到特定貼文或網頁中的圖片。

使用此短代碼將圖片插入到貼文/頁面中:[list_attached_images]
以下是一些參數:

圖像大小:如縮略圖、中型、大型
圖像數量:如-1、0、5
圖像連結:連結到圖像文件- 假/真
排序:如desc、asc
清單樣式:使用您自己的樣式

示例:
[list_attached_images imagesize=”large” numberimages=”3″ imagelink=”true” order=”asc” listclass=”my-images”]

以下是可以幫助您在主題中顯示圖片的 PHP 代碼:

$thumb_id = get_post_thumbnail_id( get_the_ID() );
$args = array(
'post_type' => 'attachment',
'post_mime_type' => 'image/jpeg',
'orderby' => 'menu_order',
'numberposts' => -1,
'order' => 'ASC',
'post_parent' => get_the_ID(),
'exclude' => $thumb_id // Exclude featured thumbnail
);
$attachments = get_posts($args);
if ( $attachments ) :
foreach ( $attachments as $attachment ) :
echo wp_get_attachment_image( $attachment->ID, 'full' );
endforeach;
endif;

網站

Reorder entry images

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Reorder Entry Images」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin will help you manually reorder or sort the images attached to your post, custom post type or page. Once installed and activated you can choose which post type or page you want this functionality on. All the images attached to that specific post or page will then be listed on the post-edit page in the admin. You will then be able to drag & drop the images in the order you want them to be listed.
This will only affect those images uploaded to the specific post or page.
Insert images into post/page with this shortcode: [list_attached_images]
Her are some parameters

imagesize: ie. thumbnail, medium, large
numberimages: ie. -1, 0, 5
imagelink: link to the image file – false/true
order: ie. desc, asc
listclass: use your own class

Example:
[list_attached_images imagesize=”large” numberimages=”3″ imagelink=”true” order=”asc” listclass=”my-images”]
Here is the php code that will help you display the images in your theme:
$thumb_id = get_post_thumbnail_id( get_the_ID() );
$args = array(
'post_type' => 'attachment',
'post_mime_type' => 'image/jpeg',
'orderby' => 'menu_order',
'numberposts' => -1,
'order' => 'ASC',
'post_parent' => get_the_ID(),
'exclude' => $thumb_id // Exclude featured thumbnail
);
$attachments = get_posts($args);
if ( $attachments ) :
foreach ( $attachments as $attachment ) :
echo wp_get_attachment_image( $attachment->ID, 'full' );
endforeach;
endif;

Website

Reorder entry images

延伸相關外掛

文章
Filter
Apply Filters
Mastodon