From 85662532c9806b2c2410b98fffecce2a081b59a4 Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Thu, 9 Oct 2014 01:07:12 +0300 Subject: [PATCH] show only three posts on the main page --- functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index e304d13..d734b26 100644 --- a/functions.php +++ b/functions.php @@ -34,13 +34,13 @@ function sh_latest_posts($atts){ $result = '

'.$atts['label'].' | '.__('see all', 'initfest').'

'; - $news_args = array( 'catecory_name' => $cat, 'numberposts' => 3 ); + $news_args = array( 'category_name' => $cat, 'numberposts' => 3 ); $news = new WP_Query( $news_args ); ob_start(); - + $i=0; if ( $news->have_posts() ) : - while ( $news->have_posts() ) : $news->the_post(); + while ( $news->have_posts() && $i++<3) : $news->the_post(); ?>