Is there a way to have a birthday field on database then use the age to restrict viewing posts?
closed as unclear what you're asking by toscho♦ Jul 23 at 23:52
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking.If this question can be reworded to fit the rules in the help center, please edit the question.
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).
|show 1 more comment|