I'm new here I want some help from you in terms of coding in wordpress. The point is that I want to make advertising between items as shown below:
<div class="row top-articles">
<?php
$args= array(
'posts_per_page'=>4,
'post__not_in'=> $excluded
);
$i=0;
$otherLoop = new WP_Query( $args );
while ($otherLoop -> have_posts() ) : $otherLoop->the_post();$i++;
$cat = get_the_category($post->ID)[0];
array_push($excluded,$post->ID);
?>
<div class="small-6 top-story-container columns medium-6 large-3">
<article class="artikulli-<?php echo$cat->slug; ?> live">
<a href="<?php the_permalink();?>">
<div class="img-container">
<div class="inner">
<div class="gradient"></div>
<?php if($videos = get_post_meta($post->ID, 'ecpt_videos','ecpt_foto', true)): ?>
<i class="icon dotie-icon_video dotie-icon_gallery phone-medium tablet-large desktop-medium"></i>
<?php endif; ?>
<?php if($foto = get_post_meta($post->ID, 'ecpt_foto', true)): ?>
<i class="icon dotie-icon_gallery phone-medium tablet-large desktop-medium"></i>
<?php endif; ?>
<?php the_post_thumbnail('250x140'); ?>
</div>
</div>
<div class="article-meta equalise">
<h3>
<span class="underline">
<?php if($live = get_post_meta($post->ID, 'ecpt_live', true)): ?>
<span class="live">Live</span>
<?php endif; ?>
<?php echo wp_trim_words( get_the_title(), 7 );?>
</span>
</h3>
<span class="datetime primary-color">
<?php echo $cat->cat_name; ?>
</span>
</div>
<div class="clearfix"></div>
</a>
</article>
</div>
<?php endwhile; ?>
</div>
</div>
<div class="clearfix"></div>