Answers for "get term image"

PHP
1

get term thumbnail

$image_id           = get_term_meta( $term->term_id, 'thumbnail_id', true );
$post_thumbnail_img = wp_get_attachment_image_src( $image_id, 'large' );

echo '<img src="' . $post_thumbnail_img[0] . '" alt="' . $term->name . '" />';
Posted by: Guest on June-10-2020

Browse Popular Code Answers by Language