From: Anthony Talarico Date: Mon, 15 Feb 2016 13:35:56 +0000 (-0500) Subject: removing drafts from recent posts display X-Git-Tag: v1.0.0^2~190 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=a78445c93aaab3f2f203f0f835666a365f302f3c;p=WP-Themes%2FDiscoverKZOO.git removing drafts from recent posts display --- diff --git a/parts/blog-sidebar-r.php b/parts/blog-sidebar-r.php index 3675212..b6e435a 100644 --- a/parts/blog-sidebar-r.php +++ b/parts/blog-sidebar-r.php @@ -23,7 +23,9 @@ $args = array( 'numberposts' => '5' ); $recent_posts = wp_get_recent_posts( $args ); foreach( $recent_posts as $recent ){ + if(get_post_status($recent["ID"]) != "draft"){ echo '
  • ' . $recent["post_title"].'
  • '; + } } ?>