Honestly, if I knew the magic trick, I'd be selling it to make some money :P
My son turned 4 in Sept.
I've heard (and tried) the jelly bean trick (give them one if they use the potty), the target practice one (with cheerioes or whatever else), etc.. IMO, if they're not ready, they're NOT going to use the potty. I did the jelly bean thing at home, and it didn't work. Suddenly, it worked.. but only at school. Then, he was going at school, but peeing literally all over my floors. He still sometimes poops in a pull-up (sneaking one if he has to), but I think if it's not solid, he just doesn't know what to do.

Otherwise, one day (middle of last yr) his teacher told me that she wanted me to send him to school in big boy undies. (He was holding it for the 3 hours during school, so why not?) With me standing there, she told him that he knew he was a big boy, and that he should wear big boy undies to school the following Monday. Well, he's been wearing them ever since. He has not had any accidents at school, either. He rarely if ever has accidents at home now- unless he's too preoccupied to get to the toilet in time. He *usually* poops in the toilet, and only wears pull-ups at nap time (sometimes) and bed time.