When I have had students like this in the past, it can be exhausting. What worked for me were these things....
During your lessons, give him lots of attention but in a way that doesn't reward his negative behavior or let the rest of the class realize what you are doing...
for example,
use his name as you teach,,, like "Last week, John, we were learning about the solar system...."
Make LOTS and LOTS of eye contact with him during your lessons and nod or smile at him when he's doing the right thing
Stand by him A LOT as you are teaching..
Steal little moments with him and compliment him on his good behavior that day.. like when you are dropping the kids off at art or music, pull him over quickly and have a word with him... I'm proud of you for......
Instead of looking to his friends for attention, a lot of times they begin to look for that positive attention from you. This is a lot of work, but the above things have worked for me in the past.