Added "recent_posts" function to return a list of recent blog posts to be displayed in the sidebar

Fixed implementation.