My 7 year old DS isn't exactly disliked by his peers, but he isn't particularly liked either. If ever the kids are asked to choose someone to be with, he is one of the last to be chosen. Even when we have friends round our house, when there is more than one child, the other children are constantly calling "hey x, look at this" or whatever, but they never call out to my DS to look at things or join in. It's not that they purposefully leave him out, they just always choose a different child as a first choice, when one is available.
He gets invited to whole class parties, but very rarely gets invited to other parties. Now that whole class parties are becoming less common because the kids are older, he simply doesn't get invited at all. I asked him who he wanted to invite to his party this year, and it was heartbreaking to hear him talk about the people he really liked, because I know that they have already had a party and DS wasn't invited.
I spoke to the class teacher about it and she said that I could try having more play dates, or doing more clubs. But we already do that. Every week he invites someone over, but increasingly they turn down the invitation. He does some clubs, but hasn't made any friendships through them. I watch him play and if I see him doing something that I think might not be helpful, I talk about it to him afterwards, but nothing that he does seems such a big deal that people don't really want to be around him.