adding post_status to blog side bar
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 18 Mar 2016 20:08:02 +0000 (16:08 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 18 Mar 2016 20:08:02 +0000 (16:08 -0400)
parts/blog-sidebar-r.php

index c1d43f2..77944eb 100644 (file)
@@ -8,7 +8,7 @@
                 <h2>Recent Posts</h2>
                 <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> ';