-
Notifications
You must be signed in to change notification settings - Fork 6
/
single.php
executable file
·53 lines (39 loc) · 1.32 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
<?php
/**
* The Template for displaying all single posts.
*
* @package Lucid
*/
get_header();
global $post;
?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'single' ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() )
comments_template();
?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
<div class="also-read">
<div class="site-content">
<h4 id='also-read-title'>Also read...</h4>
<ul id='also-read-items'>
<?php $recent_posts = wp_get_recent_posts(array('numberposts'=> 5, 'exclude' => $post->ID, 'post_status' => 'publish')); ?>
<?php foreach ($recent_posts as $key => $recent): ?>
<li>
<a href="<?php echo get_permalink($recent["ID"]) ?>" title="Look <?php echo esc_attr($recent["post_title"]) ?>" >
<span class="date"><?php echo date('F j, Y' ,strtotime($recent["post_date"])) ?></span>
<span class="title"><?php echo $recent["post_title"] ?></span>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>