Hi Shae! This comes up a lot but my number one recommendation when learning to work with L&L is to never invent attributes. Just like HTML, there are specific attributes that work with each tag in L&L, so it’s important to learn how the tag works and only use the attributes listed in the docs. Just like in HTML, made-up attributes will just be ignored.
If you haven’t already, you’ll probably want to read about the different methods for filtering a loop since that’ll give you some good examples and explain in which cases you might want to use query parameters, attributes, or a nested If
tag as you’ve done here.
Once you’ve understood those three approaches, I’d first try using some query parameters to filter your loop. Probably give custom_date_field
, custom_date_field_format
, and custom_date_field_compare
a shot to see if those work for you. As a value of the custom_date_field_value
the docs mention that you could just write ="current"
but I figured I’d mention that if ever you want to dynamically generate a date anywhere in L&L, you could also check out the Date
tag, which might look like this instead: custom_date_field_value="{Date format='Y-m-d'}"
. Not really necessary for that particular attribute but it might be useful to know in case you ever need to dynamically generate the current date.
If that doesn’t work (it’ll depend on the format of your ACF fields), then you could try using some more flexible Loop tag attributes like field
along with field_type
, field_compare
, and field_value
.
I hope that gets you headed in the right direction!