Hi! I have a dropdown select with some countries in a custom post type. You can choose 1 value. I want to create a comma-separated list with all values chosen in all posts, once. Non-chosen values are not displayed. So the script should echo:
France, Japan, Maroc, Australia
And for the same list, I want to have the number of different countries chosen. So in the example above the output now should be 4.
So I can create something on home like: We have 4 countries selected: France, Japan, Maroc, Australia.
ACF and these functions are new to me. I get things working as long it’s not select/checkbox/radio. So in this case… I’m stuck.
Hope you can help, best regards
Remco
To do this you would have to query all post and loop over them and get the value from each post. There isn’t a simple way to get a list of any ACF field value for every post.