Simplest method would be to add a PHP variable into The Loop which increments for each post, like this:
<?php
if(have_posts()) : while(have_posts()) : the_post();
$postcount++;
?>
Then alter the the_content() tag code to test on it, like this:
<?php
if($postcount > 1) {
the_excerpt();
} else {
the_content();
}
?>
You could add a post counter into the loop. Eg: before the loop you set $i=0 and in the loop $i++. Then depending on the value of $i (in your case when $=1) do something with it.
edit: like kafkaeski said faster
awesome guys, thanks very much.. i’ll test it out when i get to coding… just wanted 2 make sure it can be done…
one thing to throw in the mix…
i want to have 2 loops… basically, if you can imagine… a left panel with a full article in it and then a second div as a right panel with the remaining excerpts/article titles in it… i’d need to loops running right?
is the above possible with this format?
Thought I’d add that you can also use the $posts object as a counter of sorts. For that there’s no need for a “count” var; just change the_content() to:
<?php
if($post == $posts[0]) {
the_content();
} else {
echo the_excerpt();
}
?>
…
EDIT:
Missed you’re followup with this reply. For a second loop, look at get_posts(). It provides an offset argument which would let you pass over the first (latest) post from your initial loop. Note the information there on setting up a custom loop for processing the posts.