I have a 3 custom post types created (Movies, Videos and Reviews) and 1 taxonomy (Artists).
I have a loop inside the single-movies.php and inside it shows some informations about the movie, all gathered from the post. Here's what I'm working on:
<section class="aboutmovie">
<h1><?php echo get_post_meta( $post->ID, '_titulobr_filme', true ); ?></h1>
<img src="<?php echo get_post_meta( $post->ID, '_poster_filme', true ); ?>">
<h3><?php echo get_post_meta( $post->ID, '_titulo_filme', true ); ?></h3>
<span class="genero"><?php echo get_post_meta( $post->ID, '_genero_filme', true ); ?></span><br>
<span class="ano"><?php echo get_post_meta( $post->ID, '_pais_filme', true ); ?>, <?php echo get_post_meta( $post->ID, '_ano_filme', true ); ?></span><br>
<span class="dist"><?php echo get_post_meta( $post->ID, '_distribuidora_filme', true ); ?></span><br>
<span class="diretor"><b>Diretor:</b> <?php echo get_post_meta( $post->ID, '_diretor_filme', true ); ?></span><br>
<span class="roteiro"><b>Roteiro:</b> <?php echo get_post_meta( $post->ID, '_roteiro_filme', true ); ?></span>
</section>
I need to add the CAST. For that I need the terms from that taxonomy (artists). I was able to show the list using this:
<?php echo get_the_term_list(
$post->ID,
'artistas',
'<ul class="artistas"><li>',
',</li><li>',
'</li></ul>'
); ?>
But I also need some information from the custom fields of those terms (term metas: nome and imagem). Basically I need to show an image (I have a custom field called "imagem" to add a link), the link to the artist page and his name. How can I do that?