<div class="col-xl-12 col-lg-12 col-md-12 list-style-v2-item">
    <article id="post-<?php the_ID(); ?>" <?php post_class('single-post-wrapper single-post-list-style'); ?>>
        <?php get_template_part('template-parts/post/post-list/post-format'); ?>
        <div class="single-post-content">
            <?php if ('post' === get_post_type()) : ?>
                <div class="post-meta">
                    <ul>
                        <?php if (true == glamer_options('glamer_post_author', true)): ?>
                            <li><?php glamer_posted_by(); ?></li>
                        <?php endif; ?>

                        <?php if (true == glamer_options('glamer_post_date', true)): ?>
                            <li><?php glamer_posted_on(); ?></li>
                        <?php endif; ?>

                        <?php if (get_comments_number() != 0 && true == glamer_options('glamer_cmnt_number', true)) : ?>
                            <li class="comment-number"><?php glamer_comment_count(); ?></li>
                        <?php endif; ?>

                        <?php if (true == glamer_options('glamer_show_category', true)): ?>
                            <li><?php glamer_post_first_category(); ?></li>
                        <?php endif; ?>

                    </ul>
                </div>
            <?php endif; ?>
            <?php
            $title_length = glamer_options('glamer_blog_post_title_length', '20' );
            ?>
            <h2 class="post-title underline-anim-wrap">
                <a href="<?php echo esc_url(get_the_permalink()); ?>" rel="bookmark">
                    <?php echo wp_trim_words(get_the_title(), $title_length, '');
                    ?>
                </a>
            </h2>

            <?php
            $desc_length = glamer_options('glamer_blog_post_desc_length'); // Codestar field value
            ?>
            <div class="post-excerpt">
                <p>
                    <?php echo glamer_words_limit(get_the_excerpt(), $desc_length); ?>
                    <?php if (!empty(get_the_content())) {
                        echo '';
                    } ?>
                </p>
            </div>

            <?php if (glamer_options('glamer_show_readmore', true)) : ?>
                <a class="glamer-btn" href="<?php echo esc_url(get_the_permalink()); ?>">
                    <?php echo esc_html(glamer_options('glamer_blog_read_text', 'Read More')); ?>
                </a>
            <?php endif; ?>
        </div>
    </article>
</div>