on my homepage, I'm using several loops to display posts from different categories in various sections of the page.
The code I'm adding before the loop is :
<?php query_posts('category_name=featured&showposts=5'); ?>
The loop comes just afterwards
<?php
if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) : the_post();
get_template_part( $layout, 'blog-'.get_post_format() );
endwhile;
else :
?>
<article id="post-0" class="post no-results not-found clearfix">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Nothing Found', 'swift' ); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<p><?php _e( 'Apologies, but there are no posts in the current context. Perhaps searching will help find a related
post.', 'swift' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
<div class="clear"></div>
<?php endif; ?>
And I copy paste this with the desired categories. Problem is eventhough I mention shoposts=5, 10 posts show up, whatever number I indicate.
Do you guys have any clues please ?
Thanks