Alright, problem solved. Turned out to be a pretty basic mistake, actually.
All I needed to do was to pass on the queried term as a second parameter in get_field();
. I even posted a comment here referencing one of ACF´s docs that explains just that…
Turns out I ALREADY had created the taxonomy array $collections
, which would then return the correct term in <?php foreach ( $collections as $collection ) : ?>
.
And there I was trying to do $term = get_queried_object();
followed by get_field('my_custom_field', $term)
in the template file. No wonder it wasn´t working… (Guess that´s the side effect of working for too many hours way into the night… you start getting dumb).
So, here it is. That´s all there is to it:
<?php $img = get_field('my_custom_field', $collection); ?>
<img src="https://wordpress.stackexchange.com/questions/263453/<?php echo $img["url'] ?>">
Bam! Now it obviously works.
Nothing like a fresh day, with a fresh mind.