我遇到一个问题,即我只需要显示某个类别中房屋上的特定帖子,否则它会显示已发布的所有内容,并且我将网站周围的帖子用于其他目的。
<?php query_posts('posts_per_page=3'); while(have_posts()) : the_post(); ?>
<span style="float: left; width: 180px; height: 180px; padding: 0px 60px 0px 0px;"><?php the_post_thumbnail( array(220,200) ); ?> </span>
<h3 class="excerptHeader" style="margin-top: 0px;"><a class="excerptHeader" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<span class="excerpt"><p><?php echo substr(get_the_excerpt(), 0,80); ?> [...]</p></span>
<span class="excerpt"><p><a class="excerptLink" href="<?php the_permalink(); ?>">Read full article</a></p></span>
<?php endwhile; wp_reset_query(); ?>
我尝试添加:
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句