I currently have a theme with OptionTree installed. It is used to create a list of locations which are then visible in a dropdown in the header of the page. The display code with OptionTree looks like this:
<form action="" id="formsel" method="post">
<div class="locations">
<?php $location = ot_get_option('location');?>
<label for="country_id" class="no-display">Select Country</label>
<select name="country_id" id="country_id" tabindex="1">
<option value="">Location</option>
<?php foreach($location as $listedlocation):?>
<option value="<?php echo $listedlocationhttps://wordpress.stackexchange.com/questions/213980/how-can-i-create-a-list-of-values-to-be-iterated-through-via-wordpress-customiza;?>"><?php echo $listedlocationHow Can I Create a List of Values to Be Iterated Through via WordPress Customization API?;?></option>
<?php endforeach;?>
</select>
</div>
</form>
I’d like to convert this into something similar using the WordPress Customization API, but I am unsure how to accomplish this. I have successfully implemented the customization API where it takes a single value, but not where it needs to iterate over a number of values.