0
在我看來,Wordpress畫廊有一個奇怪的工作方式。我解釋一下:WordPress的畫廊顯示附加到帖子/頁面的所有圖像
WordPress的畫廊展覽在後只有那些已經 在目前的職位上載的圖片。如果您在圖庫中添加了 已在媒體庫中的圖像,它將不會顯示!
具有創建庫,如果我從畫廊 它總要被顯示除去圖像後
畫廊顯示器附連到後所有的圖像(也 精選縮略圖和嵌入圖像),雖然這些圖像是 不包括在畫廊
我會打電話給所有這一個錯誤。
問題:是否可以在帖子中僅顯示圖庫中包含的圖像(包括已上傳圖像和已存在於Media libray中的圖像)?
通知:沒有使用簡碼[gallery exclude="..."]
,並且沒有直接從媒體庫上傳圖像?
P.S.要在帖子中顯示圖庫,我正在使用此腳本:
<ul>
<?php $images = get_children('post_type=attachment&post_mime_type=image&post_parent=' . $post->ID . '&orderby=menu_order&order=ASC');
foreach($images as $img_id => $img_r) :
$thumb = wp_get_attachment_image_src($img_id, 'thumb', true);
$full = wp_get_attachment_image_src($img_id, 'full', true); ?>
<li>
<a href="<?php echo $full[0] ?>">
<img src="<?php echo $thumb[0] ?>" alt="<?php echo get_the_title($img_id) ?>" title="<?php echo get_the_title($img_id) ?>">
</a>
</li>
<?php endforeach; ?>
</ul>