Dear folks,
first of all, big thanks for this great plugin and all the effort you put into this!
I use “Advanced Custom Fields” on a custom taxonomy for custom fields, let’s call them “Movies”.
So I assign “Movies” to some blog posts, which relate to them.
I would like to output custom fields from exactly one movie (at best randomly chosen), which of course has been assigned to the post, on a single post (single.php).
My very basic draft is like this:
<?php if (has_term('', 'movies')) { ?>
<?php $term_id = $post_id->term_id; ?>
<?php echo get_field('director', 'movies_'.$term_id); ?>
<?php echo get_field('release', 'movies_'.$term_id); ?>
<?php } ?>
$term_id should actually be a randomly selected “movie”, which has been assigned to the post.
My intention is to output all the “metadata” on a single post page from one (randomly chosen) assigned “movie”.
It’d be great if you could help me with this.
Thanks!