我很難在WordPress循環中配置BX Slider頁面縮略圖滑塊。以下是我設置的內容:BX Slider Thumbnail Pager&WordPress Loop
<?php
global $post;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'category_name' => 'BX',
'numberposts' => '-1',
'order' => 'ASC'
);
$services_posts = get_posts($args);
?>
<div class="span8">
<ul class="bxslider">
<?php $count=0;foreach($services_posts as $post) : setup_postdata($post);$count++; ?>
<?php $bx_large = wp_get_attachment_image_src(get_post_thumbnail_id(), 'bx-large'); ?>
<li id="slider-<?php echo $count; ?>"><img src="<?php echo $bx_large[0]; ?>" height="<?php echo $bx_large[2]; ?>" width="<?php echo $bx_large[1]; ?>" alt="Image"></li>
<?php endforeach; ?>
</ul>
</div>
<div class="span4">
<div id="bx-pager">
<div class="row-fluid">
<?php $count=0;foreach($services_posts as $post) : setup_postdata($post); $count++; ?>
<?php $bx_small = wp_get_attachment_image_src(get_post_thumbnail_id(), 'bx-small'); ?>
<a data-slide-index="" href="#slider-<?php echo $count; ?>"><img src="<?php echo $bx_small[0]; ?>" height="<?php echo $bx_small[2]; ?>" width="<?php echo $bx_small[1]; ?>" alt="Image"></a>
<?php endforeach; ?>
</div>
</div>
</div>
此幻燈片一次不會再有。它似乎歸結爲:
data-slide-index
不知道這是什麼。我嘗試將$ count添加到它,但它不起作用。一種不知所措的方式。
感謝您的幫助!