-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
68 lines (42 loc) · 2.24 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
<? get_header(); ?>
<div class="row">
<div class="content seven columns">
<? if(have_posts()) : while(have_posts()) : the_post(); ?>
<? if(is_sticky()) :
$blogSubTitle = 'Latest blog post';
else :
$blogSubTitle = 'Blog';
endif; ?>
<p class="sub-title"><? echo $blogSubTitle; ?></p>
<article <? post_class(); ?> id="page-<? the_ID(); ?>">
<h1><? the_title(); ?></h1>
<p class="meta">Written by <? the_author_posts_link(); ?> ~ <time datetime="<?php the_time( 'Y-m-d' ); ?>"><? the_date(); ?> <? the_time(); ?></time> ~ posted in <? the_category('$bull;'); ?></p>
<? if(has_post_thumbnail()) : ?>
<?
$img_id = get_post_thumbnail_id($post->ID);
$image = wp_get_attachment_image_src($img_id, 'primary');
$img_url = $image['0'];
$alt_text = get_post_meta($img_id , '_wp_attachment_image_alt', true);
?>
<figure>
<img src="<? echo $img_url; ?>" title="<? the_title_attribute(); ?> thumbnail image" alt="<? $alt_text; ?>" />
</figure>
<? endif; ?>
<? the_content(); ?>
<p class="sub-title">Share</p>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_pinterest_pinit"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=mitchrenton"></script>
<!-- AddThis Button END -->
<? //comments_template(); ?>
</article>
<? endwhile; endif; ?>
</div><!-- content -->
<? get_sidebar(); ?>
</div><!-- row -->
<? get_footer(); ?>