wordpress hotnews 主题 归档页最简代码

<?php 
//debuge("fuck all of you!");die;
?>
<?php get_header(); ?>
<div id="content">
    <!-- menu -->
    <div id="map">
        <div class="browse">现在位置: <a title="返回首页" href="<?php echo get_settings('Home'); ?>/">首页</a> &gt; 
<?php 
if (have_posts()) {
            $post = $posts[0]; 
            if (is_category()) { 
                 echo get_category_parents( get_query_var('cat') , true , ' &gt; ' ).'文章'; 
            } elseif( is_tag() ) { 
                 single_tag_title();
            } elseif (is_day()) {
                 the_time('Y年m月').'发表的文章';
            } elseif (is_month()) { 
                '所有'.the_time('Y年m月').'文章';
            } elseif (is_year()) { 
                'Archive for'.the_time('Y');
            } elseif (is_author()) { 
                 wp_title( '').'发表的所有文章';
            } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { 
                echo '<h1>Blog Archives</h1>';
            } 
            ?>
        </div>
        <div id="feed"><a href="<?php bloginfo('rss2_url'); ?>" title="RSS">RSS</a></div>
    </div>

    <?php 
    while ( have_posts() ) { 
            the_post(); 
    ?>
            <?php comments_popup_link('+0&deg; ', '+1&deg; ', '+%&deg; ');//评论数 ?>
            <a href="<?php the_permalink() ?>" rel="bookmark" title="详细阅读 <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
            <?php the_time('Y年m月d日') ?>
            <?php the_category(', ') ?>
            <?php include('includes/source.php'); ?>
            <?php echo count_words ($text); ?>
            <?php if(function_exists('the_views')) { print ' &#8260; 被围观 '; the_views(); print '+';  } ?>
            <?php edit_post_link('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', '  ', '  '); ?>
            <?php include('includes/thumbnail.php'); ?>
            <?php 
            has_excerpt() ? the_excerpt(): mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 400,"...");
            ?>
            <?php the_tags('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ', ', ', ''); ?>
            <br><br><br><br><br>
    <?php 
    }  
    ?>

<?php 
}
?>
<?php pagination($query_string); ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

 

posted @ 2013-01-22 21:24  meetrice  阅读(240)  评论(0编辑  收藏  举报