0
我將所有頁面的附件圖像都放入模板中,以便我可以在其上使用Jquery Galleriffic庫。WordPresspress:附件庫只顯示5張圖片
畫廊工作正常,但由於某些原因,它只顯示5個縮略圖,這不是由Galleriffic插件控制的,它在讀取Jquery文件之前限制縮略圖。
這裏是我如何在附件拉動代碼:
<?php $images = get_posts("post_mime_type=image&post_type=attachment&orderby=menu_order ID&order=ASC&post_parent=$post->ID"); // we get array of images ?>
<?php if(!empty($images)) foreach($images as $img) : ?>
<li><a class="thumb" href="<?php echo array_shift(wp_get_attachment_image_src($img->ID,"large")); ?>"><img src="<?php echo array_shift(wp_get_attachment_image_src($img->ID,"thumbnail")); ?>" alt="<?php echo esc_attr($img->post_title); ?>" /></a></li>
<?php endforeach; ?>
任何人可以幫助我嗎?