forked from TamerShlash/Sampression-Lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
98 lines (73 loc) · 3.72 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
// Exit if accessed directly
if ( !defined('ABSPATH')) exit;
/**
* The Template for displaying all single posts.
*
* @package Sampression-Lite
* @since Sampression Lite 1.0
*/
get_header(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<nav id="nav-above" class="post-navigation clearfix columns twelve">
<h3 class="assistive-text hidden"><?php _e( 'Post navigation', 'sampression' ); ?></h3>
<div class="nav-previous alignleft"><?php previous_post_link('« %link', '%title', $in_same_cat = TRUE ); ?></div>
<div class="nav-next alignright"><?php next_post_link('%link »', '%title', $in_same_cat = TRUE); ?></div>
</nav><!-- #nav-above -->
<section id="content" class="columns twelve" role="main">
<article <?php post_class('post'); ?> id="post-<?php the_ID(); ?>">
<?php if ( has_post_thumbnail() ) { ?>
<div class="featured-img">
<?php the_post_thumbnail( 'featured' ); ?>
</div>
<!-- .featured-img -->
<?php } ?>
<header class="post-header">
<h2 class="post-title"><a href="<?php get_permalink() ?>"><?php the_title(); ?></a></h2>
</header>
<div class="meta clearfix">
<div class="col count-comment">
<?php if ( comments_open() ) : ?>
<span class="pointer"></span>
<?php comments_popup_link(__('0', 'sampression'), __('1', 'sampression'), __('%', 'sampression')); ?>
<?php endif; ?>
</div>
<?php
printf( __( '%3$s <time class="" datetime="2011-09-28"><span class="ico"> </span>%2$s</time> ', 'sampression' ),'meta-prep meta-prep-author',
sprintf( '<a href="%4$s" title="%2$s" rel="bookmark">%3$s</a>',
get_month_link( get_the_time('Y'), get_the_time('m')),
esc_attr( get_the_time() ),
get_the_date(),
get_permalink()
),
sprintf( '<div class="post-author"><span class="ico hello"> </span><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></div>',
get_author_posts_url( get_the_author_meta( 'ID' ) ),
sprintf( esc_attr__( 'View all posts by %s', 'sampression' ), get_the_author() ),
get_the_author()
)
);
?>
<div class="cats"><?php printf(__('<span class="ico"> </span> %s', 'sampression'), get_the_category_list(__(', '))); ?></div>
<?php if(has_tag()) {?>
<div class="tags"><span class="ico"> </span><?php the_tags(' ', __(', ')); ?> </div>
<?php } ?>
<?php if(is_user_logged_in()){ ?>
<div class="edit"><span class="ico"> </span> <?php edit_post_link( __( 'Edit', 'sampression' ) ); ?> </div>
<?php } ?>
</div>
<!-- .meta -->
<div class="entry clearfix">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'sampression' ) . '</span>', 'after' => '</div>' ) ); ?>
</div>
</article>
<nav id="nav-bottom" class="post-navigation clearfix columns twelve">
<h3 class="assistive-text hidden"><?php _e( 'Post navigation', 'sampression' ); ?></h3>
<div class="nav-previous alignleft"><?php previous_post_link('« %link', '%title', $in_same_cat = TRUE ); ?></div>
<div class="nav-next alignright"><?php next_post_link('%link »', '%title', $in_same_cat = TRUE); ?></div>
</nav><!-- #nav-bottom -->
<?php comments_template( '', true ); ?>
</section><!-- end content -->
<?php endwhile; endif; ?>
<?php get_sidebar('right'); ?>
<?php get_footer(); ?>