]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-content/themes/twentyseventeen/template-parts/post/content.php
WordPress 4.7
[autoinstalls/wordpress.git] / wp-content / themes / twentyseventeen / template-parts / post / content.php
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.0
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                         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                                         endif;
31                                 echo '</div><!-- .entry-meta -->';
32                         endif;
33
34                         if ( is_single() ) {
35                                 the_title( '<h1 class="entry-title">', '</h1>' );
36                         } else {
37                                 the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
38                         }
39                 ?>
40         </header><!-- .entry-header -->
41
42         <?php if ( '' !== get_the_post_thumbnail() && ! is_single() ) : ?>
43                 <div class="post-thumbnail">
44                         <a href="<?php the_permalink(); ?>">
45                                 <?php the_post_thumbnail( 'twentyseventeen-featured-image' ); ?>
46                         </a>
47                 </div><!-- .post-thumbnail -->
48         <?php endif; ?>
49
50         <div class="entry-content">
51                 <?php
52                         /* translators: %s: Name of current post */
53                         the_content( sprintf(
54                                 __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
55                                 get_the_title()
56                         ) );
57
58                         wp_link_pages( array(
59                                 'before'      => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
60                                 'after'       => '</div>',
61                                 'link_before' => '<span class="page-number">',
62                                 'link_after'  => '</span>',
63                         ) );
64                 ?>
65         </div><!-- .entry-content -->
66
67         <?php if ( is_single() ) : ?>
68                 <?php twentyseventeen_entry_footer(); ?>
69         <?php endif; ?>
70
71 </article><!-- #post-## -->