adding footer and trying query for sub categories