updated blog sidebar code
authorIan Weller <ian@gaslightmedia.com>
Tue, 23 Feb 2016 22:00:59 +0000 (17:00 -0500)
committerIan Weller <ian@gaslightmedia.com>
Tue, 23 Feb 2016 22:00:59 +0000 (17:00 -0500)
root/parts/blog-sidebar-r.php

index 1cb0327..c365130 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> ';