
Untitled
By:
deepbevel on
Feb 20th, 2012 | syntax:
None | size: 0.72 KB | hits: 16 | expires: Never
<?php query_posts( array('posts_per_page' => -1, 'cat' => '3', ));
while ( have_posts() ) : the_post();
$counter++; // add +1 to count for each post
?>
<?php
if($counter===1) {
?>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php the_content();
} else { ?>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt();?>
<?php
}
?>
<?php endwhile;?>
<div class="navigation"><p><?php posts_nav_link(); ?></p></div>
<?php
wp_reset_query();?>