<?php
$tags = get_the_tags();
if($tags):
    ?>
    <div class="tags-list <?php echo is_tag() ?  "mt-4": "my-4 pb-2"; ?>">
        <span class="mr-3">Метки:</span>
        <?php foreach($tags as $tag): ?>
            <a class="mr-3" href="<?php echo get_tag_link($tag->term_id); ?>"><?php echo $tag->name; ?></a>
        <?php endforeach; ?>
    </div>
    <?php if(wp_is_mobile() && is_single()): ?>
        <div class="pb-2">
            <?php get_template_part('adfox_ad_block_inread_mobile-2'); ?>
        </div>
    <?php endif; ?>
<?php endif; ?>