<div class="container card_box_10 mb-3">
    <div class="row">
        <?php if ($settings['title']): ?>
        <div class="col-12">
            <div class="head_card_box">
                <span class="head_card_title">
                    <?php echo $settings['title']; ?>
                </span>
                <?php if ($settings['title_show_more']): ?>
                <a href="<?php echo $settings['website_link']['url']; ?>" class="head_card_more">
                    <?php echo $settings['title_show_more']; ?>
                    <i class="fal fa-arrow-left"></i>
                </a>
                <?php endif; ?>
            </div>
        </div>
        <?php endif; ?>
    </div>
    <div class="card_box_art10" style="background-color:<?php echo $settings['background_Color_vid']; ?>">
        <div class="row">
            <?php
                while ($all_posts->have_posts()) :
                $all_posts->the_post();
            ?>
            <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(); ?>"
                            <?php $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium'); ?>
                                style="background-image: url(<?php echo $thumb['0']; ?>);">
                            </a>
                        </div>
                        <h3 class="title">
                            <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
                        </h3>
                        <div class="post-meta">
                            <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;
            wp_reset_postdata(); 
            ?>
        </div>
    </div>