<div class="single-post-item post-list-style-one col-lg-12">
    <article id="post-<?php the_ID(); ?>" <?php post_class('post-item'); ?>>
        <div class="single-post-wrapper">
            <?php
            if (get_post_format() === 'gallery') {
                get_template_part('template-parts/post/post-format/post-format-gallery');
            } else if (get_post_format() === 'video') {
                get_template_part('template-parts/post/post-format/post-format-video');
            } else if (get_post_format() === 'audio') {
                get_template_part('template-parts/post/post-format/post-format-audio');
            } else {
                get_template_part('template-parts/post/post-format/post-format-others');
            }
            ?>

            <div class="post-content-wrapper">

                <?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>

                <div class="post-excerpt">
                    <p>
                        <?php echo glamer_words_limit(get_the_excerpt(), 30 ); ?>
                        <?php if (!empty(get_the_content())) {
                            echo '';
                        } ?>
                    </p>
                </div>


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