The following is a portion of my archive.php file that allows for the first post to be full length (ignores the 'read more' tag) and the rest acknowledge the 'read more'. However, I want to have the first 2 posts full length, and then the rest show the teaser. I tried changing the -1 below to -2, and that didn't work. Any ideas? (
http://sourapplestudio.net/client4/)
HTML Code:
<div class="postarea">
<?php global $more; $more = -1; //declare and set $more before The Loop ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="date">
<div class="dateright">
<p><span class="time"><?php the_time('n.j.y'); ?></span> </p>
</div>
</div>
<h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php
if ($more == -1) { //do not use the more tag on the first one.
the_content();
$more = 0; //prevent this from happening again. use the more tag from now on.
}
else { //use the more tag
the_content(__('Read more...'));
}
?>
<div class="clear"></div>