(wip) Added pagination for posts

This adds pagination for the posts page. Pagination for posts under a specific category will be added in a later commit.