archive-sitemap.php 1.9 KB
<?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/>' ;
} 
?>