added post_status arg to blog sidebar
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 18 Mar 2016 19:41:40 +0000 (15:41 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 18 Mar 2016 19:41:40 +0000 (15:41 -0400)
parts/blog-sidebar-r.php

index 1cb0327..f2cbe82 100644 (file)
@@ -8,7 +8,7 @@
                 <p>Recent Posts</p>
                 <ul>
                 <?php
-                        $args = array( 'numberposts' => '5' );
+                        $args = array( 'numberposts' => '5', 'post_status' =>'publish' );
                         $recent_posts = wp_get_recent_posts( $args );
                         foreach( $recent_posts as $recent ){
                                 echo '<li><a href="' . get_permalink($recent["ID"]) . '">' .   $recent["post_title"].'</a> </li> ';