在遍历所有帖子的 for 循环中,如何将帖子的所有标签附加为 div 类的一部分?
<?php
$page_name = $wp_query->post->post_name;
query_posts('category_name='. $page_name .'&posts_per_page=-1&orderby=date&order=DESC');
?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="galleryItem ">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
<div class="titlePlate">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"> <?php the_title(); ?></a></h3>
</div><!--END titlePlate-->
</div><!--END galleryItem-->
<?php endwhile; else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?><?php wp_reset_query(); ?>