rebuilt wp loop for categories