This repository has been archived by the owner on Nov 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
72 lines (59 loc) · 1.83 KB
/
single.php
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
<?php
/*
* single.php
* ----------
* PHP: template for displaying single posts
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main grid_16 prefix_2 suffix_2" role="main">
<?php
while ( have_posts() ) : the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( "blog" ); ?>>
<a class="entry-thumb" href="<?php echo esc_url( get_permalink() ) ?>">
<?php
the_post_thumbnail( '880-440-thumb' );
?>
</a>
<header class="entry-header">
<?php
the_title( '<h1 class="entry-title">', '<span class="page-title-underline"></span></h1>' );
?>
</header>
<div class="entry-meta">
<?php
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
echo 'Posted: <a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>';
?>
</div>
<div class="entry-content">
<?php
the_content();
?>
</div>
<div class="separator prefix_2 suffix_2"><span class="grid_7"></span></div>
<div class="clear"></div>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
</article>
<?php
endwhile; // End of the loop.
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();