Restrict users viewing post using age on database [closed]

There are probably a few ways to do this. The easiest way I can think of is to install Pods Framework. You can install it through the WordPress repository like you’d normally install a plugin, or through GitHub. Using Pods, you can extend the WordPress user database to add a birthday field. You can also use it to extend your posts and pages by adding a custom field where you can enter your age restriction. Pods is very easy to use, and once you have everything set up, it’s just a matter of editing some code in your template files to read the data. Data can be stored in separate MySQL tables, but in this case, I think the simplest way to do it is to store it as meta keys / meta values (which is the standard in WordPress).