A public footpath in Wrexham will close for six months.