From 19c443cd4c3dfc5614fd6786e9c79a15638f1d95 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Thu, 4 Feb 2016 10:07:55 -0500 Subject: [PATCH] Only show published posts in recent --- functions.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.17.1