Try it with this in your theme’s functions.php:
function custom_prev_posts($limit = 5){
global $wpdb, $post;
$html = '';
$prev_posts = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE $wpdb->posts.post_date < '%s' AND $wpdb->posts.post_type = 'post' AND $wpdb->posts.post_status = 'publish' ORDER BY $wpdb->posts.post_date DESC LIMIT $limit", $post->post_date ) );
if($prev_posts){
$html .= '<ul>';
foreach ( $prev_posts as $prev_post ) {
$html .= '<li><a href="' . get_permalink( $prev_post->ID ) . '">' .$prev_post->post_title . '</a></li>';
}
$html .= '</ul>';
}
return $html;
}
And call the function inside the loop in single.php:
<?php echo custom_prev_posts(); ?>
Or if you want 2 previous posts:
<?php echo custom_prev_posts(2); ?>