<div class="container card_box_2">
    <div class="row">
        <?php if ($settings['title']): ?>
        <div class="col-12">
            <div class="head_card_box">
                <span class="head_card_title" style="color:<?php echo $settings['box_title']; ?>">
                    <?php echo $settings['title']; ?>
                </span>
                <?php if ($settings['title_show_more']): ?>
                    <a href="<?php echo $settings['website_link']['url']; ?>" class="head_card_more" style="color:<?php echo $settings['box_title_redmor']; ?>">
                        <?php echo $settings['title_show_more']; ?>
                        <i class="fal fa-arrow-left"></i>
                    </a>
                <?php endif; ?>
            </div>
        </div>
        <?php endif; ?>
        <div class="col-12">
            <div class="content_box_area list-item-area-sim">
            <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="page-content col-12 col-sm-6 col-md-4 col-lg-3">
                        <a href="<?php echo get_permalink(); ?>">
                            <div class="card_cont" style="background-image: url('<?php echo $thumb['0']; ?>');">
                                <div class="content">
                                <h2 class="title"><?php echo the_title(); ?></h2>
                                <button class="btn">ادامه مطلب</button>
                                </div>
                            </div>
                        </a>
                    </div>
                    <?php endwhile; ?>
                </div>
            </div>
        </div>
    </div>
</div>