-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
65 lines (63 loc) · 2.08 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
<?php
/**
* The template for displaying Single.
*
* @package ThemeIsle
*/
get_header();
?>
<div class="wrap">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
$featured_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
<article id="single">
<h1><?php the_title(); ?></h1>
<ul class="meta-post cf">
<li class="author-icon">
<?php the_author_posts_link(); ?>
</li><!--/li .author-icon-->
<li class="calendar-icon">
<?php echo the_time( get_option( 'date_format' ) ); ?>
</li><!--/li .calendar-icon-->
<li class="comments-icon">
<a href="<?php the_permalink(); ?>#comments" title="<?php the_title(); ?>">
<?php printf( _n( 'One Comment', '%1$s Comments', get_comments_number(), 'shape' ), number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' ); ?>
</a><!--/a-->
</li><!--/li .comments-icon-->
<li class="category-icon">
<?php the_category( ', ' ); ?>
</li><!--/li .category-icon-->
</ul><!--/ul .meta-post-->
<?php
if ( $featured_image != NULL ) { ?>
<div class="single-featured-image">
<img src="<?php echo $featured_image[0]; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
</div><!--/.single-featured-image-->
<?php }
?>
<div class="single-entry cf">
<?php the_content(); ?>
</div><!--/.single-entry-->
<div class="single-tags">
<?php the_tags( 'Tags: ' ); ?>
</div><!--/.single-tags-->
<?php
wp_link_pages( array(
'before' => '<div class="post-links"><span class="post-links-title">' . __( 'Pages:', 'ti' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
?>
<?php get_template_part( 'includes/similar-articles' ); ?>
<?php comments_template(); ?>
</article><!--/#single-->
<?php }
} else {
echo '<p>No posts found.</p>';
}
?>
</div><!--/.wrap-->
<?php get_footer(); ?>