<?php
?>
<div id="tiles-10" class="tiles-layout tiles-10">
    <div class="tiles-layout-wrapper tiles-10-wrapper">
        <?php
        /**
         * Argument
         * for query post
         * ================
         */
        $count = 0;
        $args = array(
            'cat' => $cat_single_id,
            'post_type' =>  'post',
            'posts_per_page' => $post_num_to_show,
        );
        $q = new WP_Query($args);
        if($q->have_posts()):
            while($q->have_posts()):
                $q->the_post();
                ?>
                <div class="single-column" >
                    <div class="single-item-wrapper">
                        <a href="<?php the_permalink(); ?>" class="layout-thumb">
                            <img src="<?php echo esc_url(has_post_thumbnail() ? get_the_post_thumbnail_url(get_the_ID(), 'full') : ''); ?>" alt="<?php echo esc_attr('post-thumbnail', 'widgetkit-pro'); ?>">
                        </a>
                        <div class="post-content">
                            <?php if($show_cat_tag): ?>
                                <div class="post-tag">
                                    <a href="<?php echo get_category_link($cat_single_id); ?>" style="
                                            background-color:<?php echo $tax_tag_bg_color;?>;
                                            color:white;
                                            ">
                                        <?php echo get_cat_name($cat_single_id); ?>
                                    </a>
                                </div>
                            <?php endif; ?>
                            <a href="<?php the_permalink(); ?>" class="post-title">
                                <h3><?php the_title(); ?></h3>
                            </a>
                            <div class="post-meta">
                                <?php do_action('magmax-post-meta'); ?>
                            </div>
                            <?php if($show_excerpt): ?>
                                <div class="post-excerpt">
                                    <?php echo wp_trim_words(get_the_excerpt(), $excerpt_word_count, ''); ?>
                                </div>
                            <?php endif; ?>
                            <?php if($full_article_link): ?>
                                <div class="single-post-link">
                                    <a href="<?php the_permalink() ?>" class="magmax-tiles-list-button" style="

                                ">
                                        <?php esc_html_e('Full Article', 'widgetkit-pro'); ?>
                                    </a>
                                </div>
                            <?php endif; ?>
                        </div>
                        <a class="make-full-thumb-linkable" href="<?php the_permalink(); ?>"></a>
                    </div>

                </div>
                <?php
            endwhile;
            wp_reset_postdata();
        endif;
        ?>
    </div>
</div>
