During a bridal consultation to consider hiring a DJ for her wedding, a bride asked if I had a strategy if people weren't dancing. It's a great question and really serves to separate out a professional DJ/entertainer from a hobbyist. If a DJ has arrived at a place where people aren't dancing, the time to have not had that happen has already passed. An inexpensive hobbyist DJ would be left only with a cheesy and uncomfortable tactic like the "Hokey Pokey" or a stupid announcement like "Yo people get up out ya seats!"
The time to plan to have a dancefloor full of dancing wedding guests is in advance of the event. It comes from time spent talking to the bride and groom about their musical tastes and the vision they have for their wedding celebration. It happens during the dinner hour, chatting with wedding guests as time allows. It's the DJ reading the crowd properly. Well selected and executed background music should have naturally elevated the mood of the room from a formal ceremony to what will be a dance party after dinner. It comes from creating a confidence level in the abilities of the DJ, even before the first dance song is played, which includes the way you stand, the way your equipments looks and sounds and the way you are dressed. Then a professional entertainer can lead the way and take the wedding guests on a fun/ crazy/ musical/ dancing/ celebrating journey and finish the night breathless and satisfied and with fantastic memories of the night.