i've bred guineapigs for 12 long years and have much exprience in fidgity piggies. First, hold them against your stomach or chect with their back against you. Keep them up right so you don't constrict their lungs. NEXT, have another person if any near to take the nail clippers and cut to about a few centimeters before the red in the nails. IF YOUR ALONE. you can do this yourself BUT, if they begin to twitch or fight, let them relax for a moment, and try again.
cutting the red in the nail does happen, but try to avoid it, it hurts them and makes them afraid of the nail cutting days.
Hope i helped a little