-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsingle.php
96 lines (90 loc) · 4.37 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
96
<?php get_header(); ?>
<div id="column1" class="grid_8">
<div class="post-block">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<h1 class="post-head"><?php the_title(); ?></h1>
<p class="post-subhead"><?php
$subtitle = get_post_meta( $post->ID, 'cnpolitics_subtitle', true );
echo $subtitle;?></p>
<p class="post-tag">
<?php
$posttags = get_the_tags();
if ($posttags) {
foreach($posttags as $tag) {
echo '#'.$tag->name.' ';
}
}
?>
</p>
<p class="post-author">
<!--a href="<?php echo get_author_posts_url(get_the_author_meta('ID'));?>"><?php echo get_the_author_meta('display_name');?></a-->
<a href="<?php echo get_author_posts_url(get_the_author_meta('ID'));?>"><?php echo get_the_author();?></a><span style="font-size:14px;color:#b9b9b9;">|<?php the_date('Y-m-d') ?></span>
</p>
<!--p class="post-lead"><?php echo get_the_excerpt();?></p-->
<div class="post-body">
<?php the_content(); ?>
</div>
<div class="post-share">
<p>欢迎分享。如需全文转载,请阅读<a href="<?php echo get_site_url().'/static/?static_page=copyright.php';?>">版权声明</a>。</p>
<!--div class="social"-->
<ul>
<?php
$share_title = "» ". get_the_title(). " 政见 CNPolitics.org ";
$pic_url = "";
if (has_post_thumbnail( $post->ID ) ) {
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
$pic_url = $image[0];
}
$share_href = "http://www.jiathis.com/send/?url=".get_permalink($post->ID)."&title=".$share_title."&pic=".$pic_url."&uid=1657293";
?>
<li><a href="<?php echo $share_href;?>&webid=tsina" class="sina"><img src="<?php bloginfo('template_directory'); ?>/images/sina.png" class="img-hover"></a></li>
<li><a href="<?php echo $share_href;?>&webid=tqq" class="tecent"><img src="<?php bloginfo('template_directory'); ?>/images/tecent.png" class="img-hover"></a></li>
<li><a href="<?php echo $share_href;?>&webid=t163" class="a163"><img src="<?php bloginfo('template_directory'); ?>/images/a163.png" class="img-hover"></a></li>
<li><a href="<?php echo $share_href;?>&webid=googleplus" class="gplus"><img src="<?php bloginfo('template_directory'); ?>/images/gplus.png" class="img-hover"></a></li>
<li><a href="<?php echo $share_href;?>&webid=renren" class="renren"><img src="<?php bloginfo('template_directory'); ?>/images/renren.png" class="img-hover"></a></li>
<li><a href="#" class="copy-link"><img src="<?php bloginfo('template_directory'); ?>/images/copy-link.png" class="img-hover"></a></li>
</ul>
</div> <!-- icon list -->
<!--/div--> <!-- social box -->
<div class="post-end-button back-to-top">
<p style="padding-top:20px;">回到开头</p>
</div>
<div id="display_bar">
<img src="<?php bloginfo('template_directory'); ?>/images/shadow-post-end.png">
</div>
<div class="comment-head">
<img style="float:right;padding:4px 0px 8px 10px;" class="expand-comments" src="<?php bloginfo('template_directory'); ?>/images/arrow-expand.png">
<img style="float:right;padding:4px 0px 8px 10px;" class="collapse-comments" src="<?php bloginfo('template_directory'); ?>/images/arrow-collapse.png">
<!--p style="font-size:14px;float:right;"><a href="#">发表评论</a> | 阅读<a href=""><?php echo count($comments); ?></a>条评论</p-->
<p class="comment-click" style="font-size:14px;float:right; cursor:pointer;"><a href="#" style="pointer-events: none;">发表评论</a> | 阅读<a href="<?php echo get_settings('home')."/?p=".get_the_ID();?>" id="uyan_count_unit" style="pointer-events: none;">0</a>条评论</p>
<script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js?uid=1657293"></script>
<p style="font-size:16px;"><b>欢迎真知灼见!</b></p>
</div>
<div class="comment-body">
<?php comments_template();?>
</div>
</div> <!-- post-block end -->
</div> <!-- column 1 end -->
<?php
endwhile;
?>
<?php
else :
?>
<div class="oneblog_top"></div>
<div class="single_post">
<h2>Not Found</h2>
<p>Sorry, but you are looking for something that isn't here.</p>
</div><!--/single_post-->
<div class="oneblog_btm"></div>
<?php
endif;
?>
<div id="column2" class="grid_4">
<?php get_sidebar('info'); ?>
</div>
<div class="clear"></div>
<?php get_footer(); ?>
<script type="text/javascript" src="<?php bloginfo('template_directory');?>/js/single.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory');?>/js/comments.js"></script>