hi guys
months ago i was able to hide posts from a loop, it was an events list, and i was able to hide past events using the meta query:
meta key: date_picker_entry
meta value: {current_date:Y-m-d}
compare: greater than or equal
this worked, if date_picker_entry was earlier than today, the post was hidden. no more past events listed. magic.
i have now another tricky loop, that needs to show only some stuff. same posts, but this time i’m querying a term, a taxonomy called ‘year’ (2023, 2024, and so on), it’s a custom field that was helpful to build this: https://www.federicobenuzzi.com/date/archivio-date/ where every tab shows only events in that specific year. i need to show the term only if it’s grater than the current year, or hide if greater.
so, i thought, if i set something like this, i could make it work:
meta key: year
meta value: {current_date:Y-m-d}
compare: lesser or equal
sadly, of course, no. i’m quite sure that’s because of {current_date:Y-m-d} so i’m looking for the right way to do it. {current_date:Y} is not working, i was hoping for…
anyone knows how to properly hide terms?
thanks a lot