How to make the forloop of moving through project pages infinite?

Pls. check out this thread: Navigation / pagination loop, I think it’s similar to your problem.