Answers for "get term image by term id wordpress"

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

Code answers related to "get term image by term id wordpress"

Browse Popular Code Answers by Language