While I agree that Xander should have been used more in the later seasons, I disagree that he was useless. Xander was the rock his friends needed. He was their link to humanity and the "adult" among the youngsters. He was the one to help fixing the Magic Box and Buffy's house for free or for a lesser price. He was the shoulder his friends would cry on. He was the one always taking the first step to adulthood: a job, his own apartment, getting engaged. In S7, he filled in the role of the gang's father. He was the one with the opposing view to Buffy's.
So, while his role was subtle and unflashy, it wasn't at all useless. And S5/S6/S7 would be a lot different without him.