From 0149ee0f2d4f3c785c12a34e471e447e41624dd1 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Thu, 4 Feb 2016 10:07:41 -0500 Subject: [PATCH] Only show published posts in recent --- functions.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/functions.php b/functions.php index 55b6637..722ef6d 100644 --- a/functions.php +++ b/functions.php @@ -144,3 +144,12 @@ add_image_size('glm_blocks', '257', '257', true); // needed to keep Woocommerce from constantly complaining. add_theme_support( 'woocommerce' ); ?> + + $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 -- 2.17.1