<?php $terms = get_the_terms(get_the_ID(), 'post_tag'); ?>

<?php if ($terms && ! is_wp_error($terms) && get_theme_mod('single_tag', true)) : ?>
	<div class="rt-post-tag is-layout-flex gap-20">
		<div class="taxonomy-tag is-style-outline wp-block-post-terms has-xx-small-font-size">
			<?php foreach ($terms as $term) : ?>
				<a class="<?php echo 'tag-' . esc_attr($term->slug); ?>" href="<?php echo esc_url(get_term_link($term)); ?>">
					<?php echo esc_html($term->name); ?>
				</a>
			<?php endforeach; ?>
		</div>
	</div>
<?php endif; ?>