Apply Pagination on Topics and Posts