-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent-single.php
More file actions
55 lines (48 loc) · 1.82 KB
/
Copy pathcontent-single.php
File metadata and controls
55 lines (48 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* Template part for displaying single post content.
*
* Renders a full single post including a hero header with an optional featured
* image (shown only for standard, image, and gallery post formats), the post
* categories and title, structured data via the entry-script template part,
* paginated post content, and the entry footer (tags, edit link, etc.).
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
* @package Canard
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header entry-hero">
<?php if ( has_post_thumbnail() && ( ! has_post_format() || has_post_format( 'image' ) || has_post_format( 'gallery' ) ) ) : ?>
<div class="post-thumbnail">
<?php the_post_thumbnail( 'canard-single-thumbnail', [ 'loading' => 'eager', 'fetchpriority' => 'high' ] ); ?>
</div>
<?php endif; ?>
<div class="entry-header-wrapper">
<div class="entry-header-inner">
<?php canard_entry_categories(); ?>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</div>
</div>
</header><!-- .entry-header -->
<?php get_template_part( 'entry', 'script' ); ?>
<div class="entry-content">
<?php the_content(); ?>
<?php
wp_link_pages( [
'before' => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'canard' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'canard' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
] );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php canard_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->