Return to Snippet

Revision: 14229
at May 25, 2009 15:43 by kwilson


Initial Code
<?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; ?>

Initial URL


Initial Description
This example will display the full content of the five most recent posts, and just the headlines from the five before that.

Initial Title
Single Wordpress loop showing lastest couple posts and headlines for the rest

Initial Tags
wordpress

Initial Language
PHP