Update recent post
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 25 Feb 2016 18:03:54 +0000 (13:03 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 25 Feb 2016 18:03:54 +0000 (13:03 -0500)
Only published post goto recent

archive.php
home.php
index.php
single.php
style.css

index acd9822..af04511 100644 (file)
@@ -45,7 +45,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> ';
index acd9822..7faba80 100644 (file)
--- a/home.php
+++ b/home.php
@@ -45,7 +45,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> ';
index acd9822..af04511 100644 (file)
--- a/index.php
+++ b/index.php
@@ -45,7 +45,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> ';
index a3fcfe6..e75a0b8 100644 (file)
@@ -70,7 +70,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> ';
index 68017f7..28af18a 100644 (file)
--- a/style.css
+++ b/style.css
@@ -3,5 +3,5 @@ Theme Name: Emmet County EMS
 Author: Gaslight Media
 Author URI: http://www.gaslightmedia.com
 Description: A theme for Emmet County EMS
-Version: 1.0.9
-*/
\ No newline at end of file
+Version: 1.1.4
+*/