From: Laury GvR Date: Thu, 4 Feb 2016 15:07:55 +0000 (-0500) Subject: Only show published posts in recent X-Git-Tag: v1.0.14^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=19c443cd4c3dfc5614fd6786e9c79a15638f1d95;p=WP-Themes%2Fstaffords.git Only show published posts in recent --- diff --git a/functions.php b/functions.php index 722ef6d..6559ebf 100644 --- a/functions.php +++ b/functions.php @@ -147,9 +147,10 @@ add_theme_support( 'woocommerce' ); $number_recents_posts,'post_status'=>'publish'); + $args=array('numberposts' => $number_recents_posts,'post_status'=>'publish'); $recent_posts = wp_get_recent_posts( $args ); foreach($recent_posts as $post){ - echo '
  • ' . $post["post_title"].'
  • '; - } ?> \ No newline at end of file + echo '
  • ' . $post["post_title"].'
  • '; + } +?> \ No newline at end of file