Add content between Wordpress queried posts
I am wondering how I can add something between posts being queried in Wordpress through th开发者_JAVA技巧is method:
<?php $the_query = new WP_Query('category_name=name&showposts=2');
while ($the_query->have_posts()) : $the_query->the_post();?>
Is there a way I could add something simple, like say a <hr>
between the two posts being pulled?
<?php $the_query = new WP_Query('category_name=name&showposts=2');
while ($the_query->have_posts())
{
$the_query->the_post();
echo '<hr />';
}
?>
精彩评论