Hello everyone!.
I have a field, a date picker.
I need to create a special function where the post change the background color if is a past date taking the date from the date picker field in ACF.
Any ideas where to begging with this?.
Many thanks!.
Hi @Rai Uriarte
1. You can get the date picker value like so: get_field('field_name')
http://www.advancedcustomfields.com/resources/get_field/
2. You can get the current date like so:
http://php.net/manual/en/function.date.php
3. You can compare them like so:
http://stackoverflow.com/questions/8722806/how-to-compare-two-dates-in-php
Hope that helps
Cheers
E
Many thanks Elliot I appreciate your time.