我是WordPress的新手,我对“循环”有意见我在页面的左侧有一个侧边栏,用来显示两个类别的最新帖子。在页面的中间,应该有特定页面的内容。在右栏中,应该有特定类别的帖子。
问题是:当我设置左列时,中间一列显示的是帖子内容,而不是页面。看见http://opachicago.com/wp/ 如果这不合理的话。
以下是我的循环代码:
左列(应显示最新帖子):
<?php query_posts(\'category_name=News and Events, Uncategorized&showposts=5\'); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<p><?php the_time(\'M j\') ?>: <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
<?php endwhile; ?>
<?php endif; ?>
中间列(应显示页面内容):<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>