1
0
mirror of https://github.com/ascribe/wp-theme synced 2024-12-22 09:13:38 +01:00

only return published posts

This commit is contained in:
Matthias Kretschmann 2016-03-10 15:46:03 +01:00
parent 6d89ed96d2
commit 8d080d5bb7

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'];