Show queried posts in a taxonomy loop template and custom post type

I have two types of personalized publications (& # 39; services & # 39; and & # 39; case studies & # 39;), one of them (services) is a taxonomy for the other (case studies). My goal is to show a list at the bottom of & # 39; single-services.php & # 39; to show / get all posts (case_studies) in which & # 39; this service was tagged & # 39 ;.

This is what I got so far:

    'case_studies', 'posts_per_page' => 1, 'orderby' => 'rand', 'tax_query' => array( array( 'taxonomy' => 'services', 'field' => 'id', 'terms' => $qobj->term_id, // 'field' => 'slug', // 'terms' => $qobj->name ) ) ); $random_query = new WP_Query( $args ); // var_dump($random_query); // debugging only if ($random_query->have_posts()) { while ($random_query->have_posts()) { $random_query->the_post(); ?>