<article id="post-<?php the_ID(); ?>" <?php post_class('single-template'); ?>>

    <?php if ( has_post_thumbnail() ) : ?>
        <div class="post-thumbnail">
            <?php the_post_thumbnail('medium_large'); ?>
        </div>
    <?php endif; ?>

    <section class="entry-header">
        <h1 class="entry-title"><?php the_title(); ?></h1>

    </section><!-- .entry-header -->

    <div class="entry-content">
        <?php
        // Mostra il contenuto completo del post
        the_content();

        // Paginazione per post divisi in più pagine
        wp_link_pages( array(
            'before' => '<div class="page-links">' . __( 'Pages:', 'nexo' ),
            'after'  => '</div>',
        ) );
        ?>
    </div><!-- .entry-content -->

    <section class="entry-footer">
        <div class="entry-categories">
            <?php the_category(' '); ?>
        </div><!-- .entry-categories -->
        <div class="entry-tags">
            <?php $post_tags = get_the_tags();
            if ( $post_tags ) {
                foreach( $post_tags as $tag ) {
                    echo '<a href="' . esc_url( get_tag_link( $tag->term_id ) ) . '" class="tag-link">' . esc_html( $tag->name ) . '</a> ';
                }
            }
            ?>
        </div>


        <div class="entry-meta">
            <p><?php echo esc_html( get_the_date() ) . ' - ' . esc_html( get_the_author() ); ?></p>


        </div><!-- .entry-meta -->

    </section><!-- .entry-footer -->

</article><!-- #post-<?php the_ID(); ?> -->
