I am building a search script that will filter results based on ages:
- Posts are people on my site.
- The age is entered as a date of birth in a custom field.
I am confident I can write a function to convert this date of birth to an age, then add it again as another custom field.
My only worry is, what happens each year when they get older? I am not too sure what to do. I could have a script that runs each day…but this feels like a cheat.
I’ve got a site where there is:
And in the theme’s
functions.phpthis: