Adding assignment of the_post() to $post.