【发布时间】:2013-02-06 13:40:04
【问题描述】:
<?php get_header(); ?>
<div class="page-wrap group">
<div class="grid">
<?php query_posts('showposts=6'); ?>
<?php if (have_posts()): ?>
<section class="blog-posts col-2-3 grid-pad">
<?php while (have_posts()) : the_post(); ?>
<article class="module" id="post-<?php the_ID(); ?>">
<h2> <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a </h2>
<p><time datetime="2001-05-15 19:00"><?php echo date('l jS F Y')?></p>
<?php the_excerpt(); ?>
</article>
<?php endwhile; ?>
</section>
这是我的 index.php 代码,我想做的是在 <section class="blog-posts col-2-3 grid-pad"> 中写 3 篇博文,然后在 <section class="blog-posts col-2-3 grid-pad"> 中写另外 3 篇博文
那么,如何循环发布帖子,以便让它们在页面上散布?现在我只能得到它,所以它会在第一个显示它们
【问题讨论】:
-
当然可以。也会坐在右边。