<div class="container">
    <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 card_box_3">
            <div class="row">
                <?php
                    while ($all_posts->have_posts()) :
                    $all_posts->the_post(); ?>
                    <div class="cards_item col-12 col-sm-6 col-md-4 col-lg-3">
                        <div class="card_arti">
                            <div class="card_image">
                            <?php
                            if (has_post_thumbnail()) {
                            the_post_thumbnail(array(300, 300), array('alt' => '' . get_the_title(), 'title' => '' . get_the_title() . ''));
                            } else { ?>
                            <img src="<?php print(get_template_directory_uri()); ?>/assets/images/thumb.gif" width="60" height="60" alt="<?php _e('Image not found', 'liona'); ?>" title="<?php _e('Image not found', 'liona'); ?>">
                            <?php } ?>
                            </div>
                            <div class="card_content">
                            <h2 class="card_title"><?php echo the_title(); ?></h2>
                            <?php echo '<p class="card_text">' . get_the_excerpt() . '</p>'; ?>
                            <a href="<?php the_permalink();?>">
                                <button class="btn card_btn">ادامه مطلب</button>
                            </a>
                            </div>
                        </div>
                    </div>
                    <?php endwhile; ?>
                </div>
            </div>
        </div>
    </div>
</div>