WordPress 4.6.3
[autoinstalls/wordpress.git] / wp-content / themes / twentyfourteen / content.php
1 <?php
2 /**
3  * The default template for displaying content
4  *
5  * Used for both single and index/archive/search.
6  *
7  * @package WordPress
8  * @subpackage Twenty_Fourteen
9  * @since Twenty Fourteen 1.0
10  */
11 ?>
12
13 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
14         <?php twentyfourteen_post_thumbnail(); ?>
15
16         <header class="entry-header">
17                 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
18                 <div class="entry-meta">
19                         <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
20                 </div>
21                 <?php
22                         endif;
23
24                         if ( is_single() ) :
25                                 the_title( '<h1 class="entry-title">', '</h1>' );
26                         else :
27                                 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
28                         endif;
29                 ?>
30
31                 <div class="entry-meta">
32                         <?php
33                                 if ( 'post' == get_post_type() )
34                                         twentyfourteen_posted_on();
35
36                                 if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
37                         ?>
38                         <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
39                         <?php
40                                 endif;
41
42                                 edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
43                         ?>
44                 </div><!-- .entry-meta -->
45         </header><!-- .entry-header -->
46
47         <?php if ( is_search() ) : ?>
48         <div class="entry-summary">
49                 <?php the_excerpt(); ?>
50         </div><!-- .entry-summary -->
51         <?php else : ?>
52         <div class="entry-content">
53                 <?php
54                         /* translators: %s: Name of current post */
55                         the_content( sprintf(
56                                 __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
57                                 the_title( '<span class="screen-reader-text">', '</span>', false )
58                         ) );
59
60                         wp_link_pages( array(
61                                 'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
62                                 'after'       => '</div>',
63                                 'link_before' => '<span>',
64                                 'link_after'  => '</span>',
65                         ) );
66                 ?>
67         </div><!-- .entry-content -->
68         <?php endif; ?>
69
70         <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
71 </article><!-- #post-## -->