From: Laury GvR Date: Thu, 4 Feb 2016 15:07:41 +0000 (-0500) Subject: Only show published posts in recent X-Git-Tag: v1.0.14^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=0149ee0f2d4f3c785c12a34e471e447e41624dd1;p=WP-Themes%2Fstaffords.git Only show published posts in recent --- 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