Files
Sophia-After-Dark/single.php
2025-05-20 23:47:21 -07:00

45 lines
1.1 KiB
PHP

<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package Sophia After Dark
* @since 1.0.0
*/
get_header();
?>
<div class="sad-page-content-wrapper">
<div id="primary" class="content-area" itemscope itemtype="https://schema.org/Article">
<main id="main" class="site-main" role="main" aria-label="<?php esc_attr_e( 'Single Post Content', 'sophia-after-dark' ); ?>">
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', 'single' );
the_post_navigation();
// Load comments template if comments are open or exist.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
endwhile;
// Load related posts section if enabled in theme settings.
$related_posts_option = get_theme_mod( 'sophia_after_dark_enable_related_posts', true );
if ( true === $related_posts_option && 'post' === get_post_type() ) {
get_template_part( 'template-parts/related/related', 'posts' );
}
?>
</main>
</div>
<?php get_sidebar(); ?>
</div>
<?php
get_footer();