Add a function to get all posts.