Hi !
I’m actually working on a website using the ACF Plugin. It works great but I’m stucked with something quite particular I want to do.
First, I’m using another plugin, called CPT-onomies, which lets me use custom posts as taxonomies.
On my website, I want to create events in which I can select multiple hosts (Hosts are a custom post type, but also taxonomies thanks to CPT-onomies). For some specific reason I want to use ACF Plugin and not the traditional way to select a taxonomies in a post. I’ve created a Taxonomy field via ACF, and then selected 3 hosts.
Now, what I want to do is to call the list of taxonomies selected in the post via ACF, and get the ID of each taxonomy so I can use it to get more data from the custom post it is attached to.
I’ve tried this code but it doesn’t show anything :
<?php $values = get_field('animateurs_event');
foreach($values as $value){
echo '<li>'.$value.'</li>';
} ?>
I’ve done a vardump and the only thing I get is something like :
STRING(20) "A:1:{I:0;S:3:"174";}"
Do you know how I could get each ID independently in a list (ul,li), and then use these ID’s to display specific information from each taxonomy it’s linked to (such as an image for example) ?
Thanks 😉