Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $taxonomy = 'film';
- $terms = get_the_terms( $post->ID , $taxonomy );
- if ( ! empty( $terms ) ) :
- echo '<div class="widget meta-block"><h3>Films</h3><ul>';
- foreach ( $terms as $term ) {
- $link = get_term_link( $term, $taxonomy );
- if ( !is_wp_error( $link ) )
- echo '<li class="' . $term->slug. '"><a href="' . $link . '" rel="tag">' . $term->name . '</a></li>';
- }
- echo '</ul></div>';
- endif;
- ?>
- <?php
- $taxonomy = 'actor';
- $terms = get_the_terms( $post->ID , $taxonomy );
- if ( ! empty( $terms ) ) :
- echo '<div class="widget meta-block"><h3>Actors</h3><ul>';
- foreach ( $terms as $term ) {
- $link = get_term_link( $term, $taxonomy );
- if ( !is_wp_error( $link ) )
- echo '<li class="' . $term->slug. '"><a href="' . $link . '" rel="tag">' . $term->name . '</a></li>';
- }
- echo '</ul></div>';
- endif;
- ?>
- <?php
- $taxonomy = 'director';
- $terms = get_the_terms( $post->ID , $taxonomy );
- if ( ! empty( $terms ) ) :
- echo '<div class="widget meta-block"><h3>Directors</h3><ul>';
- foreach ( $terms as $term ) {
- $link = get_term_link( $term, $taxonomy );
- if ( !is_wp_error( $link ) )
- echo '<li class="' . $term->slug. '"><a href="' . $link . '" rel="tag">' . $term->name . '</a></li>';
- }
- echo '</ul></div>';
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement