开发者

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 />';
 }
 ?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜