added post loop to templates