I heard this story on QI XL (Series K, episodes "Knits and Knots").
A knobstick wedding was the 19th-century equivalent of a shotgun wedding where, if an unmarried woman had a child and the father was known to the villagers, he would be chased around with a knobstick until he married her. A knobstick was a wooden club with a large knob on the end of it, used as a weapon. Here are some photos of knobsticks:
Considering you got walloped with one of these after a bout of pre-marital sex, these below are appropriately phallic:
The whole point of this exercise was not necessarily to preserve virtue through marriage, although that was a component. Rather, the purpose was financial. Any woman who had a child out of wedlock was "on the parish"–the community was responsible for housing them, finding them work (even if it was just in the workhouse), etc. But if you could get the woman to marry the baby-daddy, he would become financially responsible for both mother and child and relieve the parish from the "burden".
I'm sure a lot of unahppy marriages were forced in this way. I mean, the moral implications of remaining an unwed mother were bad enough, but it could not have helped anything to have you and your co-fornicator forcibly married at knob-point. One odd marriage example from 1829 reads as follows (I don't know the original source–ask Stephen Fry):
"One of those illegal celebrations of matrimony which are termed by the peasantry 'knobstick weddings' took lately place in Wirksworth. The parties forced into the blessed state are William Saxton, a slender-witter man aged 24, and Lydia Brookes, some 15 years old, who has a wooden leg."
Of course the QI panel all made appropriate jokes about if her leg was used as the knobstick. Doubtful.