<section class="layout-14 mb-3">
  <div class="overfullshadow"></div>
<?php $all_posts->the_post(); 
$thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium_large');
?>
  <div class="cdsaghs" style="background-image: url('<?php echo $thumb['0']; ?>')">
    <div class="main_content">
      <div class="card-heder14">
        <div class="col-12 col-md-6">
          <h3>
            <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
              <?php the_title(); ?>
            </a>
          </h3>
          <?php echo '<p class="card_text">' . get_the_excerpt() . '</p>'; ?>
          <div class="app-card-content">
            <div class="details pt-3">
              <span>نوشته شده توسط <?php the_author(); ?></span>
              <span class="ml-3"><?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' پیش'; ?></span>
            </div>
          </div>
        </div>
      </div>
      <div class="row">
        <?php while ($all_posts->have_posts()) :
              $all_posts->the_post(); 
			$thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium');
		?>
        <div class="col-12 col-sm-6 col-lg-3">
          <article class="widget_box_ch_list">
            <div class="listing_posts">
              <div class="featured">
                <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"
                  style="background-image: url('<?php echo $thumb['0']; ?>');">
                </a>
              </div>
              <h3 class="title pt-3">
                <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
              </h3>
              <div class="post-meta pt-3">
                <span class="time">
                  <?php do_action('type_article'); echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' پیش'; ?>
                </span>
              </div>
            </div>
          </article>
        </div>
        <?php endwhile; ?>
      </div>
    </div>
  </div>
</section>