index uses for loop, instead of for each, to load posts