WordPress 4.7
[autoinstalls/wordpress.git] / wp-content / themes / twentyseventeen / template-parts / post / content-excerpt.php
1 <?php
2 /**
3  * Template part for displaying posts with excerpts
4  *
5  * Used in Search Results and for Recent Posts in Front Page panels.
6  *
7  * @link https://codex.wordpress.org/Template_Hierarchy
8  *
9  * @package WordPress
10  * @subpackage Twenty_Seventeen
11  * @since 1.0
12  * @version 1.0
13  */
14
15 ?>
16
17 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
18
19         <header class="entry-header">
20                 <?php if ( 'post' === get_post_type() ) : ?>
21                         <div class="entry-meta">
22                                 <?php
23                                         echo twentyseventeen_time_link();
24                                         twentyseventeen_edit_link();
25                                 ?>
26                         </div><!-- .entry-meta -->
27                 <?php elseif ( 'page' === get_post_type() && get_edit_post_link() ) : ?>
28                         <div class="entry-meta">
29                                 <?php twentyseventeen_edit_link(); ?>
30                         </div><!-- .entry-meta -->
31                 <?php endif; ?>
32
33                 <?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
34         </header><!-- .entry-header -->
35
36         <div class="entry-summary">
37                 <?php the_excerpt(); ?>
38         </div><!-- .entry-summary -->
39
40 </article><!-- #post-## -->