ワードプレスでスライドショーを作成したいのですが、そのカテゴリを作成しました。次に、スライドショー用にそのカテゴリの画像を取得したいと思います。これが私のコードの一部です:
<div id="slide-show">
<ul>
<?php query_posts('cat=1'); while(have_posts()): the_post();?>
<li>
<a href="<?php the_permalink();?>">
<img src="<?php
$image=wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumbnail');
echo $image[0];?>" alt="<?php the_title();?>" /></a>
</li>
<?php endwhile; wp_reset_query();?>
</ul>
</div>
しかし、それは機能しません。誰か助けてくれませんか?