<?php
/**
 * Template part for displaying single post tags
 */
if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly

if(!rivax_get_option('disable-tags')) {
    $tags = get_the_tags($post->ID);
    if($tags) {
        $max = intval(rivax_get_option('max-tags-show'))?: 100;
        $count = 0;
        ?>
        <div class="clear"></div>
        <div class="single-post-tags">
		<h4><?php echo rivax_get_option('translate-tags')?: esc_html__('Tags:', 'newsfy'); ?></h4>
            <?php
            foreach($tags as $tag) {
                $count++;
                echo '<a href="'.get_tag_link($tag->term_id).'">'. esc_html($tag->name) .'</a>';
                if( $count >= $max ) { break; };
            }
            ?>
        </div>
        <?php
    }
}