Add a function to retrieve a single post from the database by id.
Add a function to retrieve a single post from the database by slug.