-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
76 lines (68 loc) · 3.45 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
<?php
/**
* The Template for displaying all single posts.
*
* @package WordPress
* @subpackage ChurchThemes
*
===================================================================================================
WARNING! DO NOT EDIT THIS FILE OR ANY TEMPLATE FILES IN THIS THEME!
To make it easy to update your theme, you should not edit this file. Instead, you should create a
Child Theme first. This will ensure your template changes are not lost when updating the theme.
You can learn more about creating Child Themes here: http://codex.wordpress.org/Child_Themes
You have been warned! :)
===================================================================================================
*/
$post_settings = get_option('ct_post_settings');
isset($post_settings['single_layout']) ? $page_layout = $post_settings['single_layout'] : $page_layout = null;
isset($post_settings['facebook_likes']) ? $facebook_likes = $post_settings['facebook_likes'] : $facebook_likes = null;
isset($post_settings['tweet_this']) ? $tweet_this = $post_settings['tweet_this'] : $tweet_this = null;
get_header(); ?>
<div id="ribbon" class="page">
<div class="container_12 grid-container content">
<div class="ribbon-wrapper">
<div class="grid_8 grid-66 alpha">
<h1><?php the_title(); ?></h1>
</div>
<div class="grid_4 grid-33 omega">
<span class="tagline"><?php echo get_the_date(); ?></span>
</div>
</div>
</div>
</div>
<div id="wrapper3" class="container_12 grid-container">
<?php if($page_layout == 'left'): get_sidebar(); endif; ?>
<div id="content" class="<?php if($page_layout == 'full'): echo 'grid_12 grid-100'; else: echo 'grid_8 grid-66'; endif; ?> <?php if($page_layout == 'left'): echo 'omega'; else: echo 'alpha'; endif; ?> single single-post">
<?php if(have_posts()) while(have_posts()): the_post(); ?>
<?php ct_posted_by(); ?>
<?php if(has_post_thumbnail()): ?>
<div class="image"><?php the_post_thumbnail('single'); ?></div>
<?php endif; ?>
<?php the_content(); ?>
<?php if((empty($facebook_likes) || $facebook_likes == 'on') || (empty($tweet_this) || $tweet_this == 'on')): ?>
<div class="social">
<ul>
<?php if((empty($facebook_likes) || $facebook_likes == 'on')): ?>
<li><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="<?php the_permalink(); ?>" layout="button_count" show_faces="false" font="lucida grande"></fb:like></li>
<?php endif; ?>
<?php if((empty($tweet_this) || $tweet_this == 'on')): ?>
<li><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"><?php _e('Tweet', 'churchthemes'); ?></a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></li>
<?php endif; ?>
</ul>
</div>
<?php endif; ?>
<?php
wp_link_pages(array(
'before' => '' . __('Pages:', 'churchthemes'),
'after' => ''
));
?>
<div class="prev"><?php previous_post_link('%link', '' . _x('←', 'Previous post link', 'churchthemes') . ' %title'); ?></div>
<div class="next"><?php next_post_link('%link', '%title ' . _x('→', 'Next post link', 'churchthemes') . ''); ?></div>
<?php edit_post_link( __('Edit this post', 'churchthemes'), '<div class="edit-post">', '</div>'); ?>
<?php comments_template('', true); ?>
<?php endwhile; // end of the loop. ?>
</div>
<?php if($page_layout == 'right' || empty($page_layout)): get_sidebar(); endif; ?>
</div>
<?php get_footer(); ?>