archive-sitemap.php
1.9 KB
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
<?php echo home_url("/"); ?><br />
<?php echo home_url("/"); ?>news<br />
<?php query_posts(array( 'post_type' => 'page') ); while (have_posts()) : the_post();?>
<?php the_permalink() ?><br />
<?php endwhile; wp_reset_query(); ?>
<?php query_posts(array( 'post_type' => 'news') ); while (have_posts()) : the_post();?>
<?php the_permalink() ?><br />
<?php endwhile; wp_reset_query(); ?>
<?php query_posts(array( 'post_type' => 'guide') ); while (have_posts()) : the_post();?>
<?php the_permalink() ?><br />
<?php endwhile; wp_reset_query(); ?>
<?php
$args = array(
'hide_empty' => 0
);
$categories = get_categories( $args );
//上面的代码获取所有分类
?>
<?php foreach($categories as $category){ ?>
<?php $categoryid = $category->term_id;
$category_link = get_category_link( $categoryid );?>
<?php echo $category_link; ?><br />
<?php } ?>
<?php query_posts(array('showposts' => 5000)); $i=1;while ( have_posts() ) : the_post(); ?>
<?php if( in_category('623') ) : ?>
<?php else: ?>
<?php the_permalink() ?><br />
<?php endif; ?>
<?php endwhile; wp_reset_query(); ?>
<?php
//tag地址
$tags = get_tags();
foreach($tags as $tag){
echo get_tag_link ($tag->term_id);
echo '<br/>';
}
?>
<hr>
<?php wp_tag_cloud('smallest=12&largest=12&unit=px&number=500&orderby=count&order=DESC&taxonomy=category');?>
<?php wp_tag_cloud('smallest=12&largest=12&unit=px&number=500&orderby=count&order=DESC');?>
<hr>
<?php
$args = array(
'hide_empty' => 0
);
$categories = get_categories( $args );
//上面的代码获取所有分类
?>
<?php foreach($categories as $category){ ?>
<?php $categoryid = $category->term_id;
$categoryname = $category->cat_name;
$category_link = get_category_link( $categoryid );?>
<?php echo $category_link; ?>{<?php echo $categoryname; ?>}<br />
<?php } ?>
<?php
//tag地址
$tags = get_tags();
foreach($tags as $tag){
echo get_tag_link ($tag->term_id);
echo '{' .$tag->name.'}<br/>' ;
}
?>