diff --git a/classes/theme.php b/classes/theme.php index 22178e196..18e4e347e 100644 --- a/classes/theme.php +++ b/classes/theme.php @@ -343,9 +343,12 @@ public function act_display( $paramarray = array( 'user_filters'=> array() ) ) if ( isset( $posts ) && count( $posts ) > 0 ) { // actually find the most recent post in the list, just in case they've been re-ordered - if ( count( $posts ) == 1 ) { + if ( $posts instanceof Post ) { $newest_post = $posts; } + else if ( count( $posts ) == 1 ) { + $newest_post = $posts[0]; + } else { $newest_post = reset( $posts ); // prime with the first one, just so we've got a real object foreach ( $posts as $post ) {