getting all radio button values
-
Hello, thank you for your awesome plugin.
I need to extract all values from radio buttons field created with advanced custom fields.
I have a city list and I’m using global variables to display matching posts with ?city=name in the url.
Now I need to display the whole city list on the main page, but only if a post containing the city exists.
In php it can be done with<?php echo implode(', ', get_field_object('example')[choices]); ?>
and this code doesn’t work in page, only in single post.
Then I would like to pass each of those values through a loop and if posts are found, show a link on the page.
I think using nested loop would be nice, one to loop each extracted radio button value and one to loop through posts.[loop category=cities]
[-loop (code to loop the checkbox array here)]
[for each=city_field value='{checkbox_value}’]
[each title]
…
[/for]
[-loop]
[/loop]I know it’s a strange request, but there is a way to do it with your plugin?
Thanks in advance
Tonyhttps://www.ads-software.com/plugins/custom-content-shortcode/
- The topic ‘getting all radio button values’ is closed to new replies.