forked from neerav/koster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
65 lines (34 loc) · 1.51 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
<?php get_header(); ?>
<div class="row">
<section id="content" class="eightcol single" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<article <?php post_class(); ?>>
<h1 class="title"><?php the_title(); ?></h1>
<?php
// Get the featured image
$image_id = get_post_thumbnail_id();
// Get the full size image details
$image_url = wp_get_attachment_image_src($image_id, 'full');
$image_url = $image_url[0];
// Get the smaller image
$bw_image_url = wp_get_attachment_image_src($image_id, 'thumbnail-bw');
$bw_image_url = $bw_image_url[0];
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
?>
<img class="featured-image wp-post-image" src="<?php echo $bw_image_url; ?>" data-fullsrc="<?php echo $image_url; ?>" title="<?php the_title(); ?>" id="post-featured-img" />
<?php } ?>
<aside class="threecol meta">
<?php koster_post_meta(); ?>
</aside>
<section class="article-content ninecol last">
<?php the_content( __( 'Continue reading →', 'koster' ) ); ?>
<?php wp_link_pages(); ?>
<?php edit_post_link( __( 'Edit', 'koster' ), '', '' ); ?>
<?php comments_template( '', true ); ?>
</section><!--/.article-content-->
</article><!--/.row-->
<?php endwhile; // end of the loop. ?>
</section>
<?php get_sidebar(); ?>
</div><!--/.row-->
<?php get_footer(); ?>