add standalone function getPosts, getPost and getPage