Update blog recent post to only published ones
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 23 Feb 2016 21:15:22 +0000 (16:15 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 23 Feb 2016 21:15:22 +0000 (16:15 -0500)
parts/blog-sidebar-r.php
style.css

index 3953ea8..b83ee45 100644 (file)
@@ -1,10 +1,10 @@
         <div id="blog-side-info-wrapper" class="small-11 small-only-text-center medium-3 columns">
             <div id="blog-side-info">
-                
+
                 <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> ';
@@ -26,4 +26,4 @@
                     ?>
                 </ul>
             </div>
-        </div>
\ No newline at end of file
+        </div>
index 091e827..298d89d 100644 (file)
--- a/style.css
+++ b/style.css
@@ -3,5 +3,5 @@ Theme Name: GreatLakesShipwreckMuseum
 Author: Gaslight Media
 Author URI: http://www.gaslightmedia.com
 Description: A theme for GreatLakesShipwreckMuseum
-Version: 1.0.5
+Version: 1.0.6
 */