Add Pagination

Adds pagination function in functions file, and calls function on
archive, index, search.