Closed. This question is
not reproducible or was caused by typos. It is not currently accepting answers.
Answer
Solution:
This can be done with css.
.menu-dish > div .dish-detail:first-child{margin-right: 10px}
menu dish direct child is selected so that other bootstrap classes would not be hampered.
Answer
Solution:
You need to catch first element:
<section class="menu-dish">
<div class="container-md flex space-between">
<?php
$term = $module['select_category'];
$args = array(
'post_type' => 'article',
'posts_per_page'=> 6,
'post_status' => 'publish'
);
$query = new WP_Query($args);
if($query->have_posts()):
$i = 1;
while($query->have_posts()): $query->the_post();
?>
<div class="dish-detail <?php echo ($i == 1)? 'max-width' : ''; ?>" data-aos="fade-up" data-aos-duration="600">
<a href="<?php the_permalink(); ?>">
<figure>
<?php $img = get_field('Image_for_article_landing_page'); ?>
<img src="<?php echo $img['url']; ?>" alt="<?php echo get_the_title(); ?>" />
</figure>
</a>
<div class="tooltip-box">
<a href="<?php the_permalink(); ?>"><?php the_field('heading_for_article_landing_page'); ?></a>
</div>
</div>
<?php $i++; endwhile; endif; ?>
</div>
</section>
Source