# 如何给发表一定时间内文章添加特殊样式？【WordPress外贸教程】 <?php

\$t1 = \$post->post_date;

\$t2 = date( “Y-m-d H:i:s” );

\$t3 = ’24’;

\$period = ( strtotime( \$t2 )-strtotime( \$t1 ) )/3600;

if ( \$period < \$t3 ) { ?>

<?php } else { ?>

<?php } ?>

<?php

\$period = current_time(‘timestamp’) – get_the_time(‘U’);

if ( \$period <= 86400 ) { ?>

<?php } else { ?>

<?php } ?>

## 推荐内容：

#### 购物车

0
{"ft_lang_label":"__label__zh","ft_lang_prob":0.6837131,"math_prob":0.8845259,"size":452,"snap":"2020-45-2020-50","text_gpt3_token_len":240,"char_repetition_ratio":0.15625,"word_repetition_ratio":0.26865673,"special_character_ratio":0.46902654,"punctuation_ratio":0.25,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96375567,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-26T21:30:04Z\",\"WARC-Record-ID\":\"<urn:uuid:668d2b9d-1a06-446e-8349-48b3154160c4>\",\"Content-Length\":\"135032\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:663777fc-1ba0-4230-bacd-65feab2c4982>\",\"WARC-Concurrent-To\":\"<urn:uuid:723539e7-afe2-4b7b-9fdb-64b5f3885af1>\",\"WARC-IP-Address\":\"129.204.0.152\",\"WARC-Target-URI\":\"http://xcx88.club/ruhegeifabiaoyidingshijianneiwenzhangtianjiateshuyangshiwordpresswaimaojiaocheng/\",\"WARC-Payload-Digest\":\"sha1:YPT46QL75ZRF5PK2OMP6BTHHTTCH7GOR\",\"WARC-Block-Digest\":\"sha1:RRT4YLI5SLOMF3PAVHCEXAOD2GPTGVAG\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107892062.70_warc_CC-MAIN-20201026204531-20201026234531-00132.warc.gz\"}"}