only return published posts

This commit is contained in:
Matthias Kretschmann 2016-03-10 15:46:03 +01:00
parent 6d89ed96d2
commit 8d080d5bb7
1 changed files with 1 additions and 1 deletions

View File

@ -383,7 +383,7 @@ class Subtemplate {
}
} else {
$latestPosts = wp_get_recent_posts(array( 'numberposts' => '3' ));
$latestPosts = wp_get_recent_posts(array( 'numberposts' => '3', 'post_status' => 'publish', ));
foreach( $latestPosts as $latest ) {
$postTitle = $latest['post_title'];