2
0
Fork 0
mirror of https://github.com/elementor/hello-theme.git synced 2026-03-03 12:56:14 +08:00
hello-theme/template-parts/single.php

40 lines
853 B
PHP

<?php
/**
* The template for displaying singular post-types: posts, pages and user-defined custom post types.
*
* @package HelloElementor
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
while ( have_posts() ) :
the_post();
?>
<main id="content" <?php post_class( 'site-main' ); ?>>
<?php if ( apply_filters( 'hello_elementor_page_title', true ) ) : ?>
<div class="page-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</div>
<?php endif; ?>
<div class="page-content">
<?php the_content(); ?>
<?php wp_link_pages(); ?>
<?php if ( has_tag() ) : ?>
<div class="post-tags">
<?php the_tags( '<span class="tag-links">' . esc_html__( 'Tagged ', 'hello-elementor' ), ', ', '</span>' ); ?>
</div>
<?php endif; ?>
</div>
<?php comments_template(); ?>
</main>
<?php
endwhile;