forked from 9IPHP/9IPHP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
86 lines (82 loc) · 2.92 KB
/
page.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
<?php
/*
Template Name: 默认模版
*/
$layout = of_get_option('side_bar');
$layout = (empty($layout)) ? 'right_side' : $layout;
get_header(); ?>
<?php if($layout == 'left_side'){ ?>
<aside class="col-md-3 hidden-xs hidden-sm">
<div id="sidebar">
<?php dynamic_sidebar( 'sidebar_single'); ?>
</div>
</aside>
<?php } ?>
<section id='main' class='<?php echo ($layout == 'single') ? 'col-md-12' : 'col-md-9'; ?>' >
<?php while ( have_posts() ) : the_post(); ?>
<article class="well clearfix page" id="post">
<header class="entry-header">
<h1 class="entry-title">
<?php the_title(); ?>
</h1>
</header>
<div class="page-content">
<?php the_content(); ?>
</div>
<!--分享-->
<?php
$share_btn_pos = of_get_option('share_btn_pos', false);
if ($share_btn_pos['page']) {
?>
<div id="share_box" class="bdsharebuttonbox" data-tag="share_2">
<a href="#" class="bds bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
<a href="#" class="bds bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
<a href="#" class="bds bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
<a href="#" class="bds bds_renren" data-cmd="renren" title="分享到人人网"></a>
<a href="#" class="bds bds_weixin" data-cmd="weixin" title="分享到微信"></a>
<a href="#" class="bds bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
<a href="#" class="bds bds_more" data-cmd="more"></a>
<a class="bds_count" data-cmd="count"></a>
<script type="text/javascript">
window._bd_share_config={
"common":{
"bdSnsKey":{},
"bdMini":"2",
"bdMiniList":false,
"bdStyle":"0",
"bdText":"一篇好文,推荐之-【<?php htmlspecialchars_decode(the_title(), ENT_QUOTES);?>】(来自:<?php echo htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); ?>)",
"bdPic" : "<?php echo _9iphp_post_image();?>",
"bdDesc": "<?php echo strip_tags(get_the_excerpt());?>",
"bdUrl": "<?php the_permalink() ?>"
},
"share" : [{
"tag" : "share_1",
"bdSize" : "16"
},
{
"tag" : "share_2",
"bdSize" : "32"
}]
};
with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script>
</div>
<?php } ?>
<!--分享-->
<footer class="entry-footer">
<!--评论模块-->
<?php comments_template(); ?>
</footer>
</article>
<?php endwhile; // end of the loop. ?>
</section>
<!--侧边栏-->
<?php if($layout == 'right_side'){ ?>
<aside class="col-md-3 hidden-xs hidden-sm">
<div id="sidebar">
<?php dynamic_sidebar( 'sidebar_single'); ?>
</div>
</aside>
<?php } ?>
<!--底部-->
<?php get_footer(); ?>