All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
You must converse with your wife, exhort her in a good manner, and explain to her that Allah has imposed on her to obey her husband, especially in those matters related to protecting her and their children's conduct. She should follow her husband's orders to keep herself and their children away from those bad things, which you mentioned in your question. There is no contradiction between being faithful to her mother and to be obedient to her husband. But one should not obey anyone against Allah's Orders. If she follows your advice and your instructions, then there is no problem. That is what we pray for to Almighty Allah. If she does not pay attention to your advice, then you must stop her from going to a person who can spoil her character and that of her children. If you intended from your saying a conditional divorce, then your wife would be divorced, if she went to her mother's house. But if you did not intend a conditional divorce and you meant an oath only and to threaten her, then the scholars differed on this issue. Some of them consider it a divorce, consequently she will be divorced. Some of them consider it an oath, so an expiation of oath would be obligatory if she went to her mother's house.
In the case of her going to her mother's house, we advise you to consult the Islamic court in your country and follow its decision. If you wish your wife and your family to be good for you and to obey you, you must obey your Lord and stick to the right path. Try your best to be a good example for your wife and children. Do not expect your wife and children's obedience while you are disobeying your Lord. Some righteous predecessors said: “Indeed I feel the effects of sins in the manners of my wife and my animal.”
For more benefit on conditional divorce, please refer to Fatwa 373048, 370447, 355693, 352696, and 328318.
Allah knows best.