<div class="container">
    <section class="widget_box_ch" style="background:<?php echo $settings['background_Color_vid']; ?>">
        <?php if ($settings['title']) : ?>
            <header>
                <h3 class="section-heading">
                    <span style="color:<?php echo $settings['text_Color_vid']; ?>">
                        <?php
                        \Elementor\Icons_Manager::render_icon($settings['Iconlayoutvid'], ['aria-hidden' => 'true']);
                        echo $settings['title'];
                        ?>
                    </span>
                </h3>
            </header>
        <?php endif; ?>
        <div class="row">
            <?php
            while ($all_posts->have_posts()) :
                $all_posts->the_post();
                $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium_large');
            ?>
                <div class="col-12 col-sm-6 col-md-4 col-lg-3">
                    <article class="widget-item-content">
                        <a href="<?php the_permalink(); ?>" class="listing-mg-type" style="background-image: url('<?php echo $thumb['0']; ?>');">
                        </a>
                        <div class="content-container">
                            <h2 class="title ">
                                <?php the_title(); ?>
                            </h2>
                        </div>
                    </article>
                </div>
            <?php endwhile; ?>
        </div>
    </section>
</div>