-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsinglepost.php
More file actions
78 lines (69 loc) · 2.89 KB
/
singlepost.php
File metadata and controls
78 lines (69 loc) · 2.89 KB
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
77
78
<?php
/**
* The default template for displaying content
*
* Used for both single and index/archive/search.
*
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/
?>
<?php $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry">
<header class="entry-header">
<?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
<div class="entry-categories">
<span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
</div>
<?php
endif;
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;
?>
<div class="entry-summary">
<?php if( $post->post_excerpt ) : ?>
<?php the_excerpt(); ?>
<?php endif ?>
</div><!-- .entry-summary -->
<div class="entry-meta">
<span class="comments-link"><?php // comments_popup_link( __( '0', 'daily' ), __( '1', 'daily' ), __( '%', 'daily' ) ); ?></span>
<?php echo get_wp_user_avatar(get_the_author_meta('ID'), 96); ?> By <?php the_author_posts_link(); ?>, <span class="time" data-timestamp="<?php echo get_the_time('U') ?>"><?php echo get_the_time('F j, Y, g:i A'); /* echo human_time_diff( get_the_time('U'), current_time('timestamp') */ ?></span>
<?php
edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading %s <span class="meta-nav">→</span>', 'twentyfourteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'nextpagelink' => __( 'Next page' ),
'previouspagelink' => __( 'Previous page' ),
) );
?>
</div><!-- .entry-content -->
<?php if ( get_the_author_meta( 'description' ) ) : ?>
<div class="entry-author-information">
<?php echo get_wp_user_avatar(get_the_author_meta('ID'), 96); ?>
<div class="author-description">
<h1><?php the_author_posts_link(); ?></h1>
<?php the_author_meta( 'description' ); ?>
</div>
</div>
<?php endif; ?>
<?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
</div>
</article><!-- #post-## -->