<div class="row">
  <?php

$category = get_category( get_query_var( 'cat' ) );
$cat_id = $category->cat_ID ?? '';
$tag = get_queried_object();
$tag_id = $tag->term_id ?? '';

$featured_args = [
  "post_type" => "post",
  "posts_per_page" => Inoby_Config::latest_posts(),
  "offset" => 0,
  "orderby" => "date",
  "order" => "desc",
  'tax_query' => array(
    'relation' => 'OR',
    array(
        'taxonomy'  => 'category',
        'field'     => 'term_id', //change to name or slug if necessary
        'terms'     => $cat_id,
        'operator'  => 'AND',
    ),
    array(
      'taxonomy'  => 'post_tag',
      'field'     => 'term_id', //change to name or slug if necessary
      'terms'     => $tag_id,
      'operator'  => 'AND',
    )
  ),
];
$featured_query = new WP_Query($featured_args);
if ( $featured_query->have_posts() ) :
while ( $featured_query->have_posts() ) : $featured_query->the_post(); 
?>
  <div class="col-3 col-md-6 col-sm-12">
    <?php get_template_part("post-types/post/parts/card", null, ["post" => $post]); ?>
  </div>
  <?php
endwhile;
endif;
wp_reset_query();
?>
</div>