add files
This commit is contained in:
64
single.php
Normal file
64
single.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
get_header(); ?>
|
||||
|
||||
<main class="main">
|
||||
|
||||
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<header class="post-header">
|
||||
|
||||
<?get_template_part( 'template-parts/breadcrumbs' );?>
|
||||
|
||||
<h1 class="post-title"><?php the_title(); ?></h1>
|
||||
|
||||
</header>
|
||||
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<figure class="single-post__thumb">
|
||||
<?php the_post_thumbnail('large'); ?>
|
||||
|
||||
<?php
|
||||
$cap = get_the_post_thumbnail_caption();
|
||||
if ( $cap ) : ?>
|
||||
<figcaption class="single-post__thumb-caption">
|
||||
<?php echo esc_html( $cap ); ?>
|
||||
</figcaption>
|
||||
<?php endif; ?>
|
||||
</figure>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="single-post__content">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
$tags = get_the_tags();
|
||||
if ($tags) : ?>
|
||||
<div class="post-tags">
|
||||
<?php foreach ($tags as $tag) : ?>
|
||||
<a href="<?php echo get_tag_link($tag->term_id); ?>" class="tag-item">
|
||||
<?php echo esc_html($tag->name); ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</article>
|
||||
|
||||
<?php get_template_part( 'template-parts/share-buttons' ); ?>
|
||||
<?php get_template_part( 'template-parts/subscripts' ); ?>
|
||||
|
||||
<?php endwhile; endif; ?>
|
||||
|
||||
</main>
|
||||
|
||||
<?php get_template_part('sidebar');?>
|
||||
|
||||
|
||||
|
||||
<?php get_footer(); ?>
|
||||
Reference in New Issue
Block a user