File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 13
13
<h3 class="widget-title">Recent Posts</h3>
14
14
<ul>
15
15
<?php
16
- $ recent_posts = wp_get_recent_posts ();
16
+ $ recent_posts = wp_get_recent_posts (array (
17
+ 'post_status ' => 'publish '
18
+ ));
17
19
foreach ( $ recent_posts as $ recent ){
18
20
echo '<li><a href=" ' . get_permalink ($ recent ["ID " ]) . '"> ' . $ recent ["post_title " ].'</a></li> ' ;
19
21
}
Original file line number Diff line number Diff line change 13
13
<h3 class="widget-title">Recent Posts</h3>
14
14
<ul>
15
15
<?php
16
- $ recent_posts = wp_get_recent_posts ();
16
+ $ recent_posts = wp_get_recent_posts (array (
17
+ 'post_status ' => 'publish '
18
+ ));
17
19
foreach ( $ recent_posts as $ recent ){
18
20
echo '<li><a href=" ' . get_permalink ($ recent ["ID " ]) . '"> ' . $ recent ["post_title " ].'</a></li> ' ;
19
21
}
You can’t perform that action at this time.
0 commit comments