测试一下代码高亮插件

测试一下代码高亮插件code snippet,整体感觉还不错。

   1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   2: <html xmlns="http://www.w3.org/1999/xhtml">
   3: <head>
   4: <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
   5: <!-- TemplateBeginEditable name="doctitle" -->
   6: <title>无标题文档</title>
   7: <link rel="profile" href="http://gmpg.org/xfn/11" />
   8: <link rel="stylesheet" type="text/css" media="all" href="&lt;?php bloginfo( 'stylesheet_url' ); ?>" />
   9: <!-- TemplateEndEditable -->
  10: <!-- TemplateBeginEditable name="head" -->
  11: <!-- TemplateEndEditable -->
  12: </head>
  13: <body>
  14:     <?php get_header(); ?>
  15:     
  16:     <!--左侧分类 开始--> 
  17:     <div class="left">
  18:         <?php $display_categories = array(1,2,3,4,5); foreach ($display_categories as $category) { ?>
  19:         <?php query_posts("showposts=1&cat=$category"); ?>
  20:  
  21:         <div class="post" id="post-&lt;?php the_ID(); ?>">
  22:             <div class="ttt">
  23:                 <a href="&lt;?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a>
  24:                 <span><?php echo category_description($category); ?></span>
  25:             </div>
  26:             <?php while (have_posts()) : the_post(); ?>
  27:                 <div class="clear">
  28:                     <div class="headline">
  29:                         <?php if( get_post_meta($post->ID, "Image", true) ): ?>
  30:                             <a href="&lt;?php the_permalink() ?>" rel="bookmark"><img src="&lt;?php echo get_post_meta($post->ID, "Image", true); ?>" title="<?php the_title(); ?>" alt="" width="310" height="245" />
  31:                             </a>
  32:                             <?php else: ?>    
  33:                                 <!--如果没有 Image 的自定义字段,则显示主题中自带的图片-->
  34:                                 <a href="&lt;?php the_permalink() ?>" rel="bookmark"><img src="http://t.douban.com/epic/large_107119803_2.jpg" title="&lt;?php the_title(); ?>" alt="" width="310" height="245" /></a>
  35:                         <?php endif; ?>
  36:                         <h3>
  37:                             <a href="&lt;?php the_permalink() ?>" rel="bookmark" title="<<?php the_title(); ?>"><?php the_title(); ?></a>
  38:                         </h3>
  39:                         <div class="txt">
  40:                             <?php the_excerpt(); ?>
  41:                         </div>
  42:                         <div class="from">
  43:                             <span class="pinglun"><?php comments_popup_link('添加评论', '1条评论', '%条评论'); ?></span>
  44:                             作者:<?php the_author_posts_link('') ?> <?php the_time('Y-m-d') ?>
  45:                         </div>
  46:                     </div>
  47:                 </div>
  48:              <?php endwhile; ?>
  49:         </div>
  50:         <?php } ?> 
  51:     </div>
  52:     <!--左侧分类 结束-->
  53:  
  54:  
  55:     <!--中间分类 开始-->
  56:     <div class="cen">
  57:         <?php $display_categories = array(1,2,3,4,5,6,7,8); foreach ($display_categories as $category) { ?>
  58:         <?php query_posts("showposts=1&cat=$category&offset=1")?>
  59:         <div class="cat">
  60:             <?php while (have_posts()) : the_post(); ?>
  61:                 <div class="post" id="post-&lt;?php the_ID(); ?>">
  62:                     <h3>
  63:                         <a href="&lt;?php the_permalink() ?>" rel="bookmark" title="<<?php the_title(); ?>"><?php the_title(); ?></a>
  64:                     </h3>
  65:                     <div class="txt">
  66:                         <?php the_excerpt(); ?>
  67:                     </div>
  68:                     <div class="from">
  69:                         <span class="pinglun"><?php comments_popup_link('添加评论', '1条评论', '%条评论'); ?></span>
  70:                         <?php the_time('Y-m-d') ?>
  71:                     </div>
  72:                 </div>
  73:             <?php endwhile; ?>
  74:         </div>
  75:         <?php } ?> 
  76:      </div>
  77:     <!--中间分类 结束-->
  78:     <?php get_sidebar(); ?>
  79:     <?php get_footer(); ?>
  80: </body>
  81: </html>

可以不能支持AS,很遗憾。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值