taking pagination links outside of the loop