<div class="container layout-13">
    <div class="row">
        <?php 
        while ($all_posts->have_posts()) :
            $all_posts->the_post();
        ?>
        <div class="col-post-cus34 right">
        <div class="cardSuggestions">
            <a href="<?php the_permalink(); ?>" class="card__picture">
              <?php the_post_thumbnail('articlethumb'); ?>
            </a>
            <div class="card__overload">
            <?php if ('yes' === $settings['show_more_categories']): ?>
              <div class="card__overload--categories">
                <?php
                  $categories = get_the_category();
                    if ( ! empty( $categories ) ) {
                        echo '<a class="card__overload--category" href="' . esc_url( get_category_link( $categories[0]->term_id ) ) . '">' . esc_html( $categories[0]->name ) . '</a>';
                    } ?>
              </div>
              <?php endif; ?>
              <a href="<?php the_permalink(); ?>" class="card__overload--link"></a>
              <a href="<?php the_permalink(); ?>" class="card__overload--title">
                <?php the_title(); ?>
              </a>
              <?php if ('yes' === $settings['show_more_specifications']): ?>
              <div class="card__overload--info">
                <div class="card__overload--author">
                  نوشته شده توسط <?php the_author(); ?>
                </div>
                <div class="card__overload--date">
                  <?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' پیش'; ?>
                </div>
              </div>
              <?php endif; ?>
            </div>
            <?php if ('yes' === $settings['show_more_icon']):?>
            <span href="#" class="card__bookmark">
              <?php \Elementor\Icons_Manager::render_icon( $settings['Iconlayoutvid'], [ 'aria-hidden' => 'true' ] ); ?>
            </span>
            <?php endif; ?>
          </div>
        </div>
        <?php endwhile; ?>
    </div>
</div>