Sophia-After-Dark/template-parts/content-single.php

62 lines
1.6 KiB
PHP

<?php
/**
* Template part for displaying single post
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Sophia After Dark
* @since 1.0.0
*/
if ( has_post_thumbnail() ) {
$post_class = 'has-thumbnail';
} else {
$post_class = 'no-thumbnail';
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( $post_class ); ?>>
<div class="post-thumbnail">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail( 'full' );
}
?>
<div class="post-info-wrap">
<div class="post-cat"><?php sophia_after_dark_article_categories_list(); ?></div>
<div class="entry-meta">
<?php
sophia_after_dark_posted_on();
sophia_after_dark_posted_by();
?>
</div>
<?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?>
</div>
</div>
<div class="entry-content">
<?php
the_content( sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'sophia-after-dark' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
) );
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'sophia-after-dark' ),
'after' => '</div>',
) );
?>
</div>
<footer class="entry-footer">
<?php sophia_after_dark_entry_footer(); ?>
</footer>
<?php get_template_part( 'template-parts/author/post', 'author-box' ); ?>
</article>