wordpress get posts by taxonomy term id code example
Example 1: wordpress get taxonomy of a post
<?php $term_obj_list = get_the_terms( $post->ID, 'taxonomy_name' ); ?>
Example 2: how to display the taxonomy image in wordpress
<?php
// get the current taxonomy term
$term = get_queried_object();
// vars
$image = get_field('cat_image', $term);
?>
<img src="<?php echo $image['url']; ?>" />
Example 3: How do I get current taxonomy "term id" on wordpress?
$obj = get_queried_object();
echo $obj->term_id;