現在、投稿の注目の画像を水平スライダーに表示して、一度に 3 つの画像を表示し、次の 3 つをクリックすると (右/左)、表示しようとしていますが、注目の画像を表示できません。
私のコード:
<div id="primary">
<div id="content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('collections'); ?>>
<header class="entry-header">
<h1 class="entry-title">Collections</h1>
</header>
<div class="entry-content">
<div class="images" >
<a href="#" class="arrow prev" ></a>
<a href="#" class="arrow next"></a>
<div class="wrap" >
<?php
$url = get_permalink();
$images = the_post_thumbnail();
$count = is_array($images) ? count($images) : 0;
if($count)
{
$n = 0; //$images[$i]['url']
for ($i = 0; $i < $count; $i++)
{
$l = $i * 100;
$t = $i * -300;
$big = image_downsize($images[$i]['id'], 'full');
$medium = image_downsize($images[$i]['id'], 'medium');
echo '<a href="', $url,'"
class=" '.(($n==0)?'n':'').' image-holder" '.(($n==0)?'id="n'.$i.'"':'').'><img src="',$big[0],'"
class="image" /></a>';
if($n < 2)
$n++ ;
else
$n = 0;
}
}
?>
<div style="clear:both"></div>
</div>
</div>
</div>
</article>
<?php endwhile; // end of the loop. ?>
</div>
</div>
誰かがこれを理解するのを手伝ってくれれば幸いです。