Restrict registration for under 18 years old
This code snippet restricts registration for under 18 years old using the custom validation applied to the Birth Date field.
Just add this code to the functions.php file in the active theme directory.
NOTE: We have created this code example to provide guidance and to make it easier for you to implement this code into your website. However, we are not able to provide any support when it comes to customizing the plugin. If you need help implementing this code, please hire a developer.
Example - the Birth Date field.
Example - a warning on registration.