Support

Account

Home Forums Front-end Issues Displaying fields from selected custom taxonomy terms Reply To: Displaying fields from selected custom taxonomy terms

  • After a fresh night of sleep, I think I finally got it!

    I did notice I had a typo (should be $term->term_id) in the example above, but I only wrote that as an example so it wasn’t the actual code that I ran.

    Regardless, it was really simple once I found out about “Display a value from a specific post“. I didn’t expect it working for terms as well so I disregarded it at first.

    
    <?php 
    $terms = get_field('multiselect_movies');
    
    if( $terms ): ?>
        <?php foreach( $terms as $term ): ?>
    
            <?php 
    
            $term_id = $term->term_id;
    
            $movie_id = "movie_" . $term_id;
    
            the_field('movie_website', $movie_id);
    
            ?>
    
        <?php endforeach; ?>
    <?php endif; ?>