-
Andrew
Hey there. I’m trying to add and acf date field but I seem to be getting something wrong with the dynamic tag syntax.
From what I can tell: {{post_meta key:submission_deadline dateFormat: F j, Y}} should work…?
When I add this the value seems to get sanitised to {{post_meta key:submission_deadline dateFormat}} and doesn’t return anything.
-
Alvind
Hi there,
If you’re using an ACF Date field, you can set the return format directly in the ACF field settings. The
dateFormat
option currently only works with the {{post_date}} dynamic tag. -
Andrew
Thanks that worked.
Just quickly – there used to be display conditions on a GB container. How is that done now? I want the wrapper container (for my date) to only display when the metadata is present.
-
Alvind
Yeah, the remove container condition option no longer exists, it was part of GP Premium but hasn’t been included since GB 2.0. We’re working on it.
In the meantime, you can use this approach:
https://generate.support/topic/generateblock-remove-container-condition/#post-157179Simply replace the field name with your ACF date field name.
-
Andrew
Wow OK. Thanks Alvind.
-
Alvind
You’re welcome!
- You must be logged in to reply to this topic.