loading...

Posts Tagged ‘自定义字段

wordpress是好物,我的大爱,啥都能做了,最近算是转型期,不知道转不转的过弯来,有用的东西先记录一下~~

1. 设定过期时间

<?php
if (have_posts()) :
while (have_posts()) : the_post(); ?>
$expirationtime = get_post_custom_values(‘expiration’);
if (is_array($expirationtime)) {
$expirestring = implode($expirationtime);}
$secondsbetween = strtotime($expirestring)-time();
if ( $secondsbetween > 0 ) {
// For example…
the_title();
the_excerpt();
}
endwhile;
endif;?>

Read the rest of this entry »

19 Comments 5,939 views



Web Share

About Me

    Enjoy Work!&& Enjoy Life!

  • 年过半百的一半却只能通过绑定来实现社会化的不想宅却没有办法的挺宅的向往B型却只是O型的不会游泳所以只能沉沦腐海的爱K歌但还不到麦霸程度的现在貌似挺稀有的白羊挨踢代码女
  • 硬盘控、下载强迫症、HTC大脸人、伪谷粉
  • Money是好物!Wordpress是好物!Jquery是好物!

Latest Comments

疼讯微博口水地

My Place

    Posts 98  Comments 1,925  
    Blog stared at 2008.10.21
    Blog open at 2008.11.21   Free Traffic Counter
ponytail1985@hotmail.com 358589691 ponie325@gmail.com Ajax CommentLuv Enabled 275ca7ef21959162b094a66262fa328f