I've used Pill Pockets to medicate other animals, but for my own, we both hold the cat while one squeezed the sides of his mouth to make it open, shove the pill in a far as we can, close the mouth and rub the throat until he swallows. Still not fun, but it works.
Try putting the pill in either butter, bologna or wet food. Messy, but effective.
Liquid meds are a bit easier. We put the cat on his back, put a drop on his lips to make him lick it off, then, while his mouth is open, we shoot the rest in the mouth. Sometimes it even all makes it in too.