-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathpage-sitemap.php
121 lines (111 loc) · 5.01 KB
/
page-sitemap.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?php
/**
Template Name: Germ 网站地图特殊页面
*/
get_header();
?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article <?php post_class('box'); ?>>
<header class="entry-header detail-page">
<h2 class="entry-name">
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
</h2>
<ul class="entry-meta">
<?php if(comments_open()) : ?>
<li class="comments_meta"><i class="fa fa-comments-o"></i> <?php comments_popup_link('暂无评论', '1 条评论', '% 条评论'); ?></li>
<?php endif; ?>
<li class="views_meta"><i class="fa fa-eye"></i> <a><?php mzw_post_views(' 访问量');?></a></li>
</ul>
</header>
<div class="entry-content" itemprop="description">
<div class="archives-content clearfix">
<?php $post0 = $post; ?>
<div class="ordered-list">
<h3>最新文章</h3>
<ol>
<?php
$myposts = get_posts('numberposts=20&orderby=post_date&order=DESC');
foreach($myposts as $post) :
setup_postdata($post);
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php
endforeach;
?>
</ol>
</div>
<div class="ordered-list">
<h3>按月查看</h3>
<ol>
<?php wp_get_archives(apply_filters('widget_archives_args', array('type' => 'monthly', 'limit' => 24))); ?>
</ol>
</div>
<div class="ordered-list">
<h3>按年查看</h3>
<ul>
<?php wp_get_archives(apply_filters('widget_archives_args', array('type' => 'yearly', 'limit' => 10))); ?>
</ul>
</div>
<div class="ordered-list">
<h3>分类</h3>
<ul>
<?php
$terms = get_terms('category', 'orderby=name&hide_empty=0' );
$count = count($terms);
if($count > 0){
foreach ($terms as $term) {
echo '<li><a href="'.get_term_link($term, $term->slug).'" title="'.$term->name.'">'.$term->name.'</a></li>';
}
}
?>
</ul>
</div>
<div class="ordered-list">
<h3>独立页面</h3>
<ul>
<?php
$myposts = get_posts('numberposts=-1&orderby=post_date&order=DESC&post_type=page');
foreach($myposts as $post) :
setup_postdata($post);
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php
endforeach;
?>
</ul>
</div>
</div>
</div>
<footer class="entry-footer clearfix">
<span class="tag-links"><?php the_tags( '', '', '' ); ?></span>
<div class="post-share">
<a href="javascript:;"><i class="fa fa-share-alt"></i><?php _e('share', 'quench');?></a>
<ul>
<li><a href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>" target="_blank"><i class="fa fa-qq"></i></a></li>
<li><a href="http://service.weibo.com/share/share.php?title=<?php the_title(); ?>&url=<?php the_permalink(); ?>" target="_blank"><i class="fa fa-weibo"></i></a></li>
<li><a href="http://share.renren.com/share/buttonshare?link=<?php the_permalink(); ?>&title=<?php the_title(); ?>" target="_blank"><i class="fa fa-renren"></i></a></li>
<li><a href="http://twitter.com/share?url=<?php the_permalink(); ?>&text=<?php the_title(); ?>" target="_blank"><i class="fa fa-twitter"></i></a></li>
</ul>
</div>
<?php if( dopt('d_ding_b') != '' ) : ?>
<div class="post-love">
<a href="javascript:;" data-action="ding" data-id="<?php the_ID(); ?>" class="favorite post-love-link <?php if(isset($_COOKIE['mzw_ding_'.$post->ID])) echo ' done';?>" title="点个赞"><i class="fa fa-heart-o"></i>
<span class="love-count">
<?php
$ding_num = get_post_meta($post->ID,'mzw_ding',true);
echo $ding_num? $ding_num : '0';
?>
</span></a>
</div>
<?php endif; ?>
</footer>
</article>
<?php
$post = $post0;
if(comments_open())
comments_template('', true);
?>
<?php endwhile; endif;?>
</div></div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>