Pro / WPML Conditions

I’ve put this in the beta as it looks like an odd bug or perhaps I’m being an idiot.

I have a client that wants a Xmas banner. The site is English / French using WPML.

As they need to switch the banners before I’m back I thought I would do some date conditions.

My conditions are working fine on the English page however on the French page the conditions won’t work.

The conditions is a date and I set the date to be after 10/12/2023 and before 01/01/2024 which works in the English however in the French the section doesn’t show.

Condition is basically {{dc:global:date format=“d/m/Y”}} after 10/12/2023

I used the format d/m/Y as initially I though it might be the “Déc” causing the issue but no matter what I have tried can’t seem to get the date condition working in the French page.

I would try using format='c' as it sounds like PHP is getting confused on thinking the month is day. French localization might be contributing to it as well. c converts to an ISO date.

{{dc:global:date format="c"}} after 2023-10-12T00:00:00-05:00. You probably don’t need to change the after part, but just in case.

Happy holidays!

https://time.lol/#10/12/2023

1 Like