zoukankan      html  css  js  c++  java
  • 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(); ?>
  • 相关阅读:
    c#大圣之路笔记——c# 页面加载数据过长等待显示框
    Python(五)
    Python(四)
    Python(三)
    python(二)数据类型与变量
    初识Python
    Linux初识(九)
    Linux初识(八)正则表达式
    Linux基础初识(七)
    Linux基础初识(六)
  • 原文地址:https://www.cnblogs.com/meetrice/p/2872087.html
Copyright © 2011-2022 走看看