If ye will fear the LORD, and serve him, and obey his voice, and not rebel against the commandment of the LORD, then shall both ye and also the king that reigneth over you continue following the LORD your God:
If you fear and obey God, listen to His voice, and don't disobey His commands, both you and your ruling king will continue to follow God.