本帖最後由 luguokankan 於 2013-7-10 19:02 編輯
$ P/ T$ E& F& r% ~% Q9 k, R, {9 `3 Y
& }% O* L1 |+ F- h* S) }一般發佈文章我都喜歡隱藏發佈時間,所以分享一下.
* T8 s) D1 E! m1 t( H最簡單自動的方法是在模板的functions.php中加如下代碼:" z( K% R4 d; @- y# t. e
% \9 {7 O5 h( [( z7 |
代碼加在開頭部分,在 <?php後即可.
( `5 E) B9 d+ w; ~9 F+ i7 [- function jl_remove_post_dates() { & l* f# F2 g1 x
- add_filter('the_date', '__return_false'); 0 M" x4 p6 b/ p0 e& }
- add_filter('the_time', '__return_false'); . E6 U* S% T' L6 n: E3 ]
- add_filter('the_modified_date', '__return_false');/ b) X# U" |# m8 \
- }
- h' Q: N, A3 `' } - add_action('loop_start', 'jl_remove_post_dates');
複製代碼 (Note: This method requires WordPress 3.0 or above)/ o$ U( Y: Z2 H" e1 k$ x4 r
( c6 w" x1 N+ j, a! d
# }& D9 y$ Q8 P- O% k |