Hello,
I am attempting to display 3 posts on the homepage of a website I'm developing. When I enter the following code, however, it displays 6 posts rather than three. Colour me confused.
<?php if ( is_home() ) {
$args=array(
'showposts' => 3,
'paged'=> 1
);
query_posts($args); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<article class="grid_4">
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<section class="entry">
<?php the_excerpt(); ?>
</section>
</article>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; } ?>
This is just the bare-bones of the code, to give you an idea of what I'm trying to do. Thanks in advance for your help!
– Pat