7日間NEWマークを表示させる
1 2 3 4 5 6 7 8 |
<?php $days=7; $today=date_i18n('U'); $entry=get_the_time('U'); $day=date('U',($today - $entry))/86400; if( $days > $day ){ echo '<span class="new">NEW</span>'; }?> |
1 2 3 4 5 6 7 8 |
<?php $days=7; $today=date_i18n('U'); $entry=get_the_time('U'); $day=date('U',($today - $entry))/86400; if( $days > $day ){ echo '<span class="new">NEW</span>'; }?> |
コメント