分别打开single.php
和page.php
两个文件,找到:
1 |
<?php the_content(); ?> |
在这行代码的上面或者下面添加以下代码:
1 2 3 4 5 6 7 |
<?php if ( (int)get_the_modified_time("U") > (int)get_the_time("U") ) : ?> <div align="center"> <font color="#999" size="1" align="center"> 文章最后编辑于:<?php the_modified_time("Y-n-j H:i:s"); ?> </font> </div> <?php endif; ?> |
由于前端不怎么会,就加了一点简单的属性,而且是直接在标签里面设置的属性,有前端基础的同学可以设置在样式中。
评论