<div class="container mb-0 card_box_12">
    <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="wrappThese col-md-8 col-sm-12 col-xs-12">
        <div class="row">
            <div class="col-md-6 col-sm-6 col-sm-12 padrl-0">
                <?php 
                    $all_posts->the_post();
                    $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'articlethumb');
                ?>
                <div class="thumbBox">
                    <a href="<?php the_permalink(); ?>" style="background-image: url('<?php echo $thumb['0']; ?>')"></a>
                    <a href="<?php the_permalink(); ?>"><span class="mobileNewsTitle"><?php the_title(); ?></span></a>
                </div>
                <?php 
                    $all_posts->the_post();
                    $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'articlethumb');
                ?>
                <div class="thumbBox">
                    <a href="<?php the_permalink(); ?>" style="background-image: url('<?php echo $thumb['0']; ?>')"></a>
                    <a href="<?php the_permalink(); ?>"><span class="mobileNewsTitle"><?php the_title(); ?></span></a>
                </div>
            </div>
            <div class="col-md-6 col-sm-6 col-sm-12 mobileNews p-0">
                <?php $all_posts->the_post(); ?>
                <div class="newsWrapper">
                    <div class="row">
                        <a href="<?php the_permalink(); ?>" class="newsImg col-4 p-0">
                        <?php the_post_thumbnail('medium'); ?>
                        </a>
                        <div class="col-8 pad5R pad0L newsTitleNews">
                        <span><a href="">
                        <?php the_title(); ?>
                        </a></span>
                        <ul>
                            <li>
                            <i class="fa fa-pencil"></i>
                            <a href=""><?php the_author(); ?></a>
                            </li>
                            <li>
                            <i class="fa fa-calendar"></i>
                            <?php do_action('type_article'); echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' پیش'; ?>
                            </li>
                        </ul>
                    </div>
                    </div>
                </div>
                <?php $all_posts->the_post(); ?>
                <div class="newsWrapper">
                    <div class="row">
                        <a href="<?php the_permalink(); ?>" class="newsImg col-4 p-0">
                        <?php the_post_thumbnail('medium'); ?>
                        </a>
                        <div class="col-8 pad5R pad0L newsTitleNews">
                        <span><a href="">
                        <?php the_title(); ?>
                        </a></span>
                        <ul>
                            <li>
                            <i class="fa fa-pencil"></i>
                            <a href=""><?php the_author(); ?></a>
                            </li>
                            <li>
                            <i class="fa fa-calendar"></i>
                            <?php do_action('type_article'); echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' پیش'; ?>
                            </li>
                        </ul>
                    </div>
                    </div>
                </div>
                <?php $all_posts->the_post(); ?>
                <div class="newsWrapper">
                    <div class="row">
                        <a href="<?php the_permalink(); ?>" class="newsImg col-4 p-0">
                        <?php the_post_thumbnail('medium'); ?>
                        </a>
                        <div class="col-8 pad5R pad0L newsTitleNews">
                        <span><a href="">
                        <?php the_title(); ?>
                        </a></span>
                        <ul>
                            <li>
                            <i class="fa fa-pencil"></i>
                            <a href=""><?php the_author(); ?></a>
                            </li>
                            <li>
                            <i class="fa fa-calendar"></i>
                            <?php do_action('type_article'); echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' پیش'; ?>
                            </li>
                        </ul>
                    </div>
                    </div>
                </div>
                <?php $all_posts->the_post(); ?>
                <div class="newsWrapper">
                    <div class="row">
                        <a href="<?php the_permalink(); ?>" class="newsImg col-4 p-0">
                        <?php the_post_thumbnail('medium'); ?>
                        </a>
                        <div class="col-8 pad5R pad0L newsTitleNews">
                        <span><a href="">
                        <?php the_title(); ?>
                        </a></span>
                        <ul>
                            <li>
                            <i class="fa fa-pencil"></i>
                            <a href=""><?php the_author(); ?></a>
                            </li>
                            <li>
                            <i class="fa fa-calendar"></i>
                            <?php do_action('type_article'); echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' پیش'; ?>
                            </li>
                        </ul>
                    </div>
                    </div>
                </div>
            </div>
        </div>
        </div>
        <div class="reviewContainer col-md-4 col-sm-12 col-xs-12">
            <div class="digtwocart">
        <?php
        $all_posts->the_post();
        $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'articlethumb');
        ?>
            <a href="" class="imageContainer" style="background-image: url('<?php echo $thumb['0']; ?>');"">
                <div class="col-2">
                    <span class="rateNumber orangBg">
                    <?php echo get_comments_number('', '', '%' ); ?>
                    </span>
                </div>
            </a>
                <div class="bg-white detailCont">
                    <div class="orangBg">
                    <?php
                        $categories = get_the_category();
                        if ( ! empty( $categories ) ) {
                            echo '<a href="' . esc_url( get_category_link( $categories[0]->term_id ) ) . '">' . esc_html( $categories[0]->name ) . '</a>';
                        } ?>                    </div>
                    <span>
                        <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
                    </span>
                    <?php echo '<p class="card_text">' . get_the_excerpt() . '</p>'; ?>
                </div>
        </div>
        </div>

    </div>
</div>