‘小技巧’ 分类的存档

一、减少查询数据库。 询数据库也许会花费比较多的时间,而有些东西是确定的,我们不需要查询数据库就知道应该是什么的。 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <meta...

Read more »

2009年8月5日16:09 | 没有评论
分类: 小技巧
标签:

在index.php里找到包含<?php the_title(); ?>的地方, 在<?php the_title(); ?>后面加上如下代码: <?php $t1=$post->post_date; $t2=date("Y-m-d H:i:s"); $diff=(strtotime($t2)-strtotime($t1))/3600; if($diff< 24){echo "< img src='http://fvf.me/new.gif' alt='...

Read more »

2009年8月5日15:16 | 没有评论
分类: 小技巧
标签: ,
页面 2 到 212