wordpresshotnews主題歸檔頁最簡程式碼

ap0581w9c發表於2013-01-22
<?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(); ?>

 


相關文章