1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Template part for displaying posts |
4
|
|
|
* |
5
|
|
|
* @link https://codex.wordpress.org/Template_Hierarchy |
6
|
|
|
* |
7
|
|
|
* @package WordPress |
8
|
|
|
* @subpackage Twenty_Seventeen |
9
|
|
|
* @since 1.0 |
10
|
|
|
* @version 1.2 |
11
|
|
|
*/ |
12
|
|
|
|
13
|
|
|
?> |
14
|
|
|
|
15
|
|
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
16
|
|
|
<?php |
17
|
|
|
if ( is_sticky() && is_home() ) : |
18
|
|
|
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) ); |
19
|
|
|
endif; |
20
|
|
|
?> |
21
|
|
|
<header class="entry-header"> |
22
|
|
|
<?php |
23
|
|
View Code Duplication |
if ( 'post' === get_post_type() ) { |
24
|
|
|
echo '<div class="entry-meta">'; |
25
|
|
|
if ( is_single() ) { |
26
|
|
|
twentyseventeen_posted_on(); |
27
|
|
|
} else { |
28
|
|
|
echo twentyseventeen_time_link(); |
29
|
|
|
twentyseventeen_edit_link(); |
30
|
|
|
}; |
31
|
|
|
echo '</div><!-- .entry-meta -->'; |
32
|
|
|
}; |
33
|
|
|
|
34
|
|
View Code Duplication |
if ( is_single() ) { |
35
|
|
|
the_title( '<h1 class="entry-title">', '</h1>' ); |
36
|
|
|
} elseif ( is_front_page() && is_home() ) { |
37
|
|
|
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); |
|
|
|
|
38
|
|
|
} else { |
39
|
|
|
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); |
40
|
|
|
} |
41
|
|
|
?> |
42
|
|
|
</header><!-- .entry-header --> |
43
|
|
|
|
44
|
|
View Code Duplication |
<?php if ( '' !== get_the_post_thumbnail() && ! is_single() ) : ?> |
45
|
|
|
<div class="post-thumbnail"> |
46
|
|
|
<a href="<?php the_permalink(); ?>"> |
47
|
|
|
<?php the_post_thumbnail( 'twentyseventeen-featured-image' ); ?> |
48
|
|
|
</a> |
49
|
|
|
</div><!-- .post-thumbnail --> |
50
|
|
|
<?php endif; ?> |
51
|
|
|
|
52
|
|
|
<div class="entry-content"> |
53
|
|
|
<?php |
54
|
|
|
/* translators: %s: Name of current post */ |
55
|
|
|
the_content( sprintf( |
56
|
|
|
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), |
57
|
|
|
get_the_title() |
58
|
|
|
) ); |
59
|
|
|
|
60
|
|
|
wp_link_pages( array( |
61
|
|
|
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ), |
62
|
|
|
'after' => '</div>', |
63
|
|
|
'link_before' => '<span class="page-number">', |
64
|
|
|
'link_after' => '</span>', |
65
|
|
|
) ); |
66
|
|
|
?> |
67
|
|
|
</div><!-- .entry-content --> |
68
|
|
|
|
69
|
|
|
<?php |
70
|
|
|
if ( is_single() ) { |
71
|
|
|
twentyseventeen_entry_footer(); |
72
|
|
|
} |
73
|
|
|
?> |
74
|
|
|
|
75
|
|
|
</article><!-- #post-## --> |
76
|
|
|
|