still trying to get pagination to work
finally a working pagination. Still requires posts per page to be found via the config file