List of items for each *unique* ACF field value
-
Hi all.
I am struggling a bit with a scenario. Not sure if this incredible plugin can do it or not.I have a list of custom post types (wines) with a series of custom fields (color, vintage, etc.). So for example:
2020
– Wine A
– Wine B
– Wine C2019
– Wine D
– Wine E2018
(empty)2017
– Wine FI would like to create a [loop] that replicates the list above, showing the list of ACF_wine-name ***for each unique ACF_vintage***.
I can’t figure out how to programmatically go through every vintage and exclude the vintages with empty wine lists. The best I can do is manually define each vintage, but that clearly is not sustainable:
<div class=”wine_list”>
<p class=”vintage”>2020</p>
[loop type=wines field=ACF_vintage value=2020]- [field ACF_wine-name]
[/loop]
</div>Any help would be greatly appreciated.
The topic ‘List of items for each *unique* ACF field value’ is closed to new replies.