Display only the terms images that are selected for a post
-
I had taken the code you provided in this post and tried to implement it on my website, but it’s outputting all of the taxonomy terms used throughout all posts.
I want to use this in a template file for a single-post inside of a loop and have it display ONLY the terms that are enabled for that specific post. How would I do this ?
<?php // List of image links $terms = apply_filters( 'taxonomy-images-get-terms', '', array( 'taxonomy' => 'series' ) ); foreach( (array) $terms as $term) { echo '<a href="' . esc_attr( get_term_link( $term ) ) . '" title="' . sprintf( __( "View all posts in %s" ), $term->name ) . '" ' . '>' . wp_get_attachment_image( $term->image_id, 'destacado-proyectos-home' ) . '</a>'; } ?>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Display only the terms images that are selected for a post’ is closed to new replies.