Files
C1024_2026/single.php
T

18 lines
1.3 KiB
PHP

<?php get_header(); ?>
<main id="main" class="site-main">
<?php // The singular main query normally has one post, but retain the standard loop contract.
while ( have_posts() ) { the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header"><div class="entry-meta"><time datetime="<?php echo esc_attr( get_the_date( DATE_W3C ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time> · <?php the_author_posts_link(); ?></div><?php the_title( '<h1 class="entry-title">', '</h1>' ); ?><?php // Omit category markup entirely when the post has no assigned categories.
if ( has_category() ) { ?><div class="taxonomy post-categories"><?php the_category( ' ' ); ?></div><?php } ?></header>
<?php if ( has_post_thumbnail() ) { ?><div class="entry-thumbnail"><?php the_post_thumbnail( 'large' ); ?></div><?php } ?>
<div class="entry-content"><?php the_content(); wp_link_pages(); ?></div>
<footer class="entry-footer"><?php // Tags render separately so untagged posts avoid empty taxonomy output.
if ( has_tag() ) { ?><div class="tags-links"><?php the_tags( '', ' ', '' ); ?></div><?php } ?></footer>
</article>
<?php // Retain existing discussions even after comments are closed.
if ( comments_open() || get_comments_number() ) { comments_template(); } the_post_navigation(); ?>
<?php } ?>
</main>
<?php get_footer();