-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
51 lines (39 loc) · 2.16 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
<?php get_header(); ?>
<div id="pageHead">
<?php $blog_page_id = of_get_option('ttrust_blog_page'); ?>
<?php $blog_page = get_page($blog_page_id); ?>
<h1><?php echo $blog_page->post_title; ?></h1>
<?php $page_description = get_post_meta($blog_page_id, "_ttrust_page_description_value", true); ?>
<?php if ($page_description) : ?>
<p><?php echo $page_description; ?></p>
<?php endif; ?>
</div>
<div id="content" class="twoThirds clearfix">
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class(); ?>>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" ><?php the_title(); ?></a></h2>
<div class="meta clearfix">
<?php $post_show_author = of_get_option('ttrust_post_show_author'); ?>
<?php $post_show_date = of_get_option('ttrust_post_show_date'); ?>
<?php $post_show_category = of_get_option('ttrust_post_show_category'); ?>
<?php $post_show_comments = of_get_option('ttrust_post_show_comments'); ?>
<?php if($post_show_author || $post_show_date || $post_show_category){ _e('Posted ', 'themetrust'); } ?>
<?php if($post_show_author) { _e('by ', 'themetrust'); the_author_posts_link(); }?>
<?php if($post_show_date) { _e('on', 'themetrust'); ?> <?php the_time( 'M j, Y' ); } ?>
<?php if($post_show_category) { _e('in', 'themetrust'); ?> <?php the_category(', '); } ?>
<?php if(($post_show_author || $post_show_date || $post_show_category) && $post_show_comments){ echo " | "; } ?>
<?php if($post_show_comments) : ?>
<a href="<?php comments_link(); ?>"><?php comments_number(__('No Comments', 'themetrust'), __('One Comment', 'themetrust'), __('% Comments', 'themetrust')); ?></a>
<?php endif; ?>
</div>
<?php if(of_get_option('ttrust_post_show_featured_image')) : ?>
<?php get_template_part( 'part-post-thumb'); ?>
<?php endif; ?>
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="pagination clearfix">Pages: ', 'after' => '</div>' ) ); ?>
</div>
<?php comments_template('', true); ?>
<?php endwhile; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>