getPosts now sets the categories