FEATURE Handling the default single page
This commit is contained in:
parent
f3ea7af3e3
commit
cea500ceda
53
single.php
53
single.php
|
|
@ -1,40 +1,39 @@
|
||||||
<?php get_header(); ?>
|
<?php get_header(); ?>
|
||||||
|
|
||||||
<div class="container my-8 mx-auto">
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$postType = get_post_type();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page-single page--single-<?php echo $postType; ?>" data-article-id="<?php echo get_the_ID(); ?>">
|
||||||
<?php if (have_posts()) : ?>
|
<?php if (have_posts()) : ?>
|
||||||
|
<?php while (have_posts()) : the_post(); ?>
|
||||||
|
<?php get_template_part('template-parts/components/posts/post-header'); ?>
|
||||||
|
|
||||||
<?php
|
<?php get_template_part('template-parts/components/posts/post-toolbar'); ?>
|
||||||
while (have_posts()) :
|
|
||||||
the_post();
|
<div class="content-wrapper" data-active-tab="post">
|
||||||
?>
|
<aside class="sidebar">
|
||||||
|
<?php get_template_part('template-parts/components/posts/post-tags'); ?>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<div class="content-area">
|
||||||
|
|
||||||
|
|
||||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
<?php get_template_part('template-parts/components/posts/post-content', null, array(
|
||||||
|
'ID' => get_the_ID()
|
||||||
|
)); ?>
|
||||||
|
|
||||||
<header class="entry-header mb-4">
|
<?php get_template_part('template-parts/components/posts/post-authors', null, array(
|
||||||
<?php the_title(sprintf('<h1 class="entry-title text-2xl lg:text-5xl font-extrabold leading-tight mb-1"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h1>'); ?>
|
'postId' => get_the_ID()
|
||||||
<time datetime="<?php echo get_the_date('c'); ?>" itemprop="datePublished" class="text-sm text-gray-700"><?php echo get_the_date(); ?></time>
|
)); ?>
|
||||||
</header>
|
</div>
|
||||||
|
|
||||||
<div class="entry-content">
|
|
||||||
<?php the_content(); ?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
wp_link_pages(
|
|
||||||
array(
|
|
||||||
'before' => '<div class="page-links"><span class="page-links-title">' . __('Pages:', 'tailpress') . '</span>',
|
|
||||||
'after' => '</div>',
|
|
||||||
'link_before' => '<span>',
|
|
||||||
'link_after' => '</span>',
|
|
||||||
'pagelink' => '<span class="screen-reader-text">' . __('Page', 'tailpress') . ' </span>%',
|
|
||||||
'separator' => '<span class="screen-reader-text">, </span>',
|
|
||||||
)
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</article>
|
|
||||||
|
|
||||||
|
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user