Support

Account

Home Forums General Issues Fields from Custom Taxonomy on Single.php Reply To: Fields from Custom Taxonomy on Single.php

  • So I found at least a solution to get the fields from the “first” taxonomy.

    It’d be great if someone could tell me how to randomize this!

    <?php
    
    global $post;
    $terms = wp_get_post_terms($post->ID, 'movies', array('fields' => 'ids'));
    
    //print_r($terms);
    
    echo $terms[0];
    
    ?>
    
    <?php echo get_field('director', 'movies_'.$terms[0]); ?>