我如何完整显示第一篇文章然后其他帖子只是 Headers .
我设法剥离了一些生成the_content的php代码,所以我可以显示 Headers . 现在我希望第一篇文章完全展示,除了其他人 .
谢谢 .
编辑:目前我有这个默认代码只是遍历每个帖子并显示 Headers .
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<div class="post-date"><?php the_time('F j, Y') ?></div>
<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
2 回答
也许试试这个......
顶部的数字是抵消它的数字 . $per_page=$paged<=1?9:10;
第一页显示第一个循环 '1' 中的最新帖子,然后是其余 '9' ,然后在以下页面显示 '10' = <=1?9:10;
希望这可以帮助 .