-
Notifications
You must be signed in to change notification settings - Fork 1
/
content-single.php
76 lines (58 loc) · 2.01 KB
/
content-single.php
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/**
* The template part for displaying the content in single.php.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package Silk Lite
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<div class="entry-meta">
<?php
silklite_posted_on();
silklite_cats_list(); ?>
</div><!-- .entry-meta -->
<?php the_title( '<h1 class="entry-title page-title">', '</h1>' ); ?>
<?php if ( has_excerpt() ) { ?>
<p class="intro intro--paragraph">
<?php
// we need to do this since Jetpack filters the_excerpt - we don't want this
echo get_the_excerpt(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</p>
<?php } ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php if ( has_post_thumbnail() && get_theme_mod( 'silklite_single_featured_image', false ) ) { ?>
<div class="entry-featured entry-thumbnail">
<?php
if ( is_active_sidebar( 'sidebar-1' ) ) {
the_post_thumbnail( 'silklite-single-image' );
} else {
//if no sidebar is used we need to use a bigger image size since the max width of the content is 1250px
the_post_thumbnail( 'full' );
} ?>
</div>
<?php }
the_content();
wp_link_pages( array(
'before' => '<div class="page-links"><span class="pagination-title">' . esc_html__( 'Pages:', 'silk-lite' ),
'after' => '</span></div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'silk-lite' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<span class="separator-wrapper--accent" role="presentation">
<?php get_template_part( 'assets/svg/separator-simple' ); ?>
</span>
<?php silklite_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->