built infinite loop and navigation for posts