2
我有一个Wordpress博客的边栏中的最近的帖子列表。标题和作者正确显示,但显示的摘录是当前页面/帖子的摘录而不是相关最近的帖子。Wordpress最近的帖子摘要在侧栏是拉的页面/帖子摘录,而不是最近的帖子摘录
代码:
<?php $myposts = get_posts('numberposts=10&offset=0');
foreach($myposts as $post) :?>
<li><a href="<?php the_permalink(); ?>"><?php the_title();?> <span>by <?php the_author(); ?></span></a> <br /> <?php the_excerpt(); ?></li>
<?php endforeach; ?>
任何想法,为什么它会拉动正确的标题/作者,但不正确的摘录?
太棒了,谢谢! – christina 2010-08-18 19:19:36