<!--FansPaysite/content-single.php-->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> itemscope itemtype="https://schema.org/Article">
    <?php if (get_theme_mod('display_title', true)): ?>
        <header class="entry-header">
            <?php
                if (has_post_thumbnail()) {
                    the_post_thumbnail('thumbnail', array( 'class' => 'ui left floated rounded tiny image', 'itemprop' => 'image' ));
                }
            ?>
            <h1 class="entry-title" itemprop="headline"><?php the_title(); ?></h1>
        </header>
    <?php endif; ?>

    <div class="entry-meta">
        <?php if (get_theme_mod('display_date', true)): ?>
            <span class="ui tiny basic label posted-on">
                <?php echo esc_html__('Posted on', 'fanspaysite') . ' '; ?>
                <time datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>" itemprop="datePublished"><?php echo get_the_date(); ?></time>
            </span>
        <?php endif; ?>

        <?php if (get_theme_mod('display_author', true)): ?>
            <span class="ui tiny basic label byline" itemprop="author" itemscope itemtype="https://schema.org/Person">
                <?php echo esc_html__('by', 'fanspaysite') . ' '; ?>
                <span itemprop="name"><?php echo get_the_author(); ?></span>
            </span>
        <?php endif; ?>

        <?php if (get_theme_mod('display_category', true) && has_category()): ?>
            <span class="ui tiny basic label posted-in"><?php echo esc_html__('in', 'fanspaysite') . ' '; the_category(', '); ?></span>
        <?php endif; ?>
    </div>

    <div class="entry-content" itemprop="articleBody">
        <?php
        the_content();

        wp_link_pages(array(
            'before' => '<div class="page-links">' . esc_html__('Pages:', 'fanspaysite'),
            'after'  => '</div>',
        ));
        ?>
    </div><!-- .entry-content -->

    <?php if (get_theme_mod('display_tags', true) && has_tag()): ?>
        <footer class="entry-footer">
            <?php 
            $post_tags = get_the_tags();
            if ($post_tags) {
                echo '<p>' . esc_html__('Tags:', 'fanspaysite') . ' ';
                foreach ($post_tags as $tag) {
                    $tag_link = get_tag_link($tag->term_id);
                    echo '<a href="' . esc_url($tag_link) . '" class="ui label secondary">' . esc_html($tag->name) . '</a> ';
                }
                echo '</p>';
            }
             ?>
        </footer><!-- .entry-footer -->
    <?php endif; ?>
</article><!-- #post-<?php the_ID(); ?> -->
