I have problems to filter posts on date fields. I have custom post ‘specials’ and ‘events’. I just want display them if ‘enddate’ is greater than ‘today’.
I tried several parts of code without success.
Any idea ?
Thanks for helping.
Hi @guinnessboy ,
Would you mind to share your code so that I can look into the problem?
This Date Picker documentation would be a great place to start for you.
Thanks. I was using a wrong date format.
$today = strtotime(date('Ymd'));
$promoend = strtotime($datefin);
Perfectly works like this. just have to compare $today and $promoend