How to display all image terms associated with the post on archive page
-
I know that the below code taken from the FAQ will display a custom term image from the category, but i want to display all image terms associated with the post.
// image id is stored as term meta $image_id = get_term_meta( 7, 'image', true ); // image data stored in array, second argument is which image size to retrieve $image_data = wp_get_attachment_image_src( $image_id, 'full' ); // image url is the first item in the array (aka 0) $image = $image_data[0]; if ( ! empty( $image ) ) { echo '<img src="' . esc_url( $image ) . '" />'; }
Any help?
Thanks
- The topic ‘How to display all image terms associated with the post on archive page’ is closed to new replies.