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(); ?>