$custom_taxterms = wp_get_object_terms( $post->ID, 'animecat', array('fields' => 'ids') );
$args = array(
'post_type' => 'anime',
'post_status' => 'publish',
'posts_per_page' => 99999999999999,
'tax_query' => array(
array(
'taxonomy' => 'animecat',
'field' => 'id',
'terms' => $custom_taxterms
)
),
'post__not_in' => array ($post->ID),
);
$related_items = new WP_Query( $args );
if ($related_items->have_posts()) :
while ( $related_items->have_posts() ) : $related_items->the_post();
?>
-
endwhile;
endif;
wp_reset_postdata();
?>