projects
/
WP-Themes
/
gaslightmedia.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
183f538
)
Only show published post
author
Steve Sutton
<steve@gaslightmedia.com>
Wed, 22 Jun 2016 14:47:32 +0000
(10:47 -0400)
committer
Steve Sutton
<steve@gaslightmedia.com>
Wed, 22 Jun 2016 14:47:32 +0000
(10:47 -0400)
So it doesn't show the draft post items.
parts/blog-sidebar-r.php
patch
|
blob
|
history
diff --git
a/parts/blog-sidebar-r.php
b/parts/blog-sidebar-r.php
index
240de61
..
2c82045
100644
(file)
--- a/
parts/blog-sidebar-r.php
+++ b/
parts/blog-sidebar-r.php
@@
-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> ';
@@
-30,4
+30,4
@@
?>
</ul>
</div>
- </div>
\ No newline at end of file
+ </div>