<div class="container related-posts related_posts_lists p-0">
    <div class="row">
        <div class="col-sm-12">
            <h4 class="title_single" style="margin-right: 1rem;"><?php _e('Read more', 'liosa'); ?></h4>
        </div>
        <ul class="col-12 related-post-lists">
            <?php
            $numbercountpagesingle  = ot_get_option('content_post_number_related', false);
            $orig_post = $post;
            global $post;
            $tags = wp_get_post_tags($post->ID);
            if ($tags) {
                $tag_ids = array();
                foreach ($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
                $args = array(
                    'tag__in' => $tag_ids,
                    'post__not_in' => array($post->ID),
                    'posts_per_page' =>  $numbercountpagesingle,
                    'ignore_sticky_posts' => 1
                );
                $my_query = new wp_query($args);
                while ($my_query->have_posts()) {
                    $my_query->the_post();
            ?>
                    <li>
                        <a href="<?php the_permalink(); ?>">
                            <?php the_title() ?>
                        </a>
                    </li>

            <?php }
            }
            $post = $orig_post;
            wp_reset_query();
            ?>
        </ul>
    </div>
</div>