-
Notifications
You must be signed in to change notification settings - Fork 1
/
content.php
76 lines (60 loc) · 2.15 KB
/
content.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 used for displaying post content on home and archive pages
*
* @package Silk Lite
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry__wrapper">
<header class="entry-header entry-header--card">
<?php if ( 'post' == get_post_type() ) { ?>
<div class="entry-meta entry-meta--card">
<?php silklite_posted_on_and_cats(); ?>
</div><!-- .entry-meta -->
<?php }
/* translators: %s: The post URL. */
the_title( sprintf( '<h2 class="entry-title entry-title--card"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php if ( has_post_thumbnail() ) { ?>
<a href="<?php the_permalink(); ?>" class="entry-featured entry-thumbnail" aria-hidden="true">
<?php the_post_thumbnail( silklite_get_thumbnail_size() ); ?>
<div class="entry-image-border"></div>
</a>
<?php }
global $post;
// Check the content for the more text
$has_more = strpos( $post->post_content, '<!--more' );
if ( $has_more ) {
the_content( sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Continue reading %s', 'silk-lite' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
} else {
the_excerpt();
} ?>
<?php
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 class="color-secondary" role="presentation">
<div class="divider wide">
<?php get_template_part( 'assets/svg/separator-not-simple-svg' ); ?>
</div>
<div class="divider narrow">
<?php get_template_part( 'assets/svg/separator-simple' ); ?>
</div>
</div>
</div><!-- .entry-content -->
</article><!-- #post-## -->