-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
95 lines (81 loc) · 2.64 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
<?php get_header(); ?>
<?php get_template_part( 'nav' ); // Navigation bar (nav.php) ?>
<div id="sectionHeaderBackground">
<div id="sectionHeader" class="container">
<div class="categoryListing">
<?php
$categories = get_the_category();
$separator = ' ';
$output = '';
if($categories){
foreach($categories as $category) {
$output .= '<a href="'.get_category_link($category->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '">'.$category->cat_name.'</a>'.$separator;
}
echo trim($output, $separator);
}
?>
</div>
<!-- /end category listing -->
<h1><?php wp_title(""); ?></h1>
</div>
</div>
<!-- /end SectionHeader -->
<div id="mainBackground">
<div id="main" class="container">
<div class="row">
<div class="span8">
<?php the_post(); ?>
<article id="post-<?php the_ID(); ?>">
<?php // checks to see if any videos are associated, if not displays feature image
$custom = get_post_custom($post->ID);
$vimeo = $custom["vimeo"][0];
$youtube = $custom["youtube"][0];
if($vimeo != NULL):
echo "<div class='video fitvid'><iframe src='http://player.vimeo.com/video/" . $vimeo . "?portrait=0' width='770' height='433' frameborder='0'></iframe></div>";
elseif($youtube != NULL): // Note the combination of the words.
echo "<div class='video fitvid'><iframe title='YouTube video player' width='770' height='433' src='http://www.youtube.com/embed/" . $youtube . "' frameborder='0' allowfullscreen></iframe></div>";
elseif ( has_post_thumbnail() ):
the_post_thumbnail('blog-feature');
else:
endif;
?>
<hr>
<div class="row">
<div class="span7 offset1">
<div class="postDate">
<small><?php the_time('F jS, Y') ?></small>
</div>
<div class="content">
<?php the_content('%link'); ?>
</div>
<hr>
<div class="postTags">
<span class="tagLabel">Tags</span>
<?php the_tags('<ul><li>','</li><li>','</li></ul>'); ?>
</div>
</div>
</div>
</article>
<div class="postNav">
<ul class="pager hidden-phone">
<li class="previous">
<?php previous_post_link('%link'); ?>
</li>
<li class="next">
<?php next_post_link('%link'); ?>
</li>
</ul>
</div>
</div>
<div class="row">
<?php if ( is_active_sidebar( 'single-sidebar' ) ) : ?>
<div class="span4">
<?php dynamic_sidebar( 'single-sidebar' ); ?>
</div>
<!-- Logo -->
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>