2012-02-27 30 views
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; ?> 

任何人可以幫助我嗎?

回答

0

貌似返回崗位的默認數量爲5(也documentation見)

嘗試更新這一點。

所以添加&numberposts=100(例如100這裏)

PS:出於可讀性起見,使其在陣列上上述

鏈接的文檔作爲顯示