Added functionality for getTermPosts.