/ Published in: PHP
This example will display the full content of the five most recent posts, and just the headlines from the five before that.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php query_posts('showposts=10'); $count = 1; ?> <?php while (have_posts()): the_post(); ?> <div class="post"> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php if ($count < 5): ?> <?php the_content(); ?> <?php endif; ?> </div> <?php $count++; ?> </div> <?php endwhile; ?>