本帖最後由 luguokankan 於 2013-7-10 19:02 編輯 # V* `) Q: e# B( a1 ?% E
: q' [, ^" _" @- {/ [; ^一般發佈文章我都喜歡隱藏發佈時間,所以分享一下.
! L6 ]% y& A) h% J最簡單自動的方法是在模板的functions.php中加如下代碼:5 g/ c, [/ N7 v) [
/ a, k. _3 p$ _6 N4 u$ C3 _$ O代碼加在開頭部分,在 <?php後即可.- 8 R( j0 Q4 I) w u6 m1 x( T/ K
- function jl_remove_post_dates() {
i) ^( Q3 P( @7 d) Z - add_filter('the_date', '__return_false'); : p2 B2 O+ h9 y
- add_filter('the_time', '__return_false');
, K2 }4 s- D d4 I! V" Y) f - add_filter('the_modified_date', '__return_false');
7 a1 g3 a( d* Q! `& P - } $ o+ P* W) n( A# \
- add_action('loop_start', 'jl_remove_post_dates');
複製代碼 (Note: This method requires WordPress 3.0 or above)
2 ^2 a2 U% c& r% r: T/ s( o! z( }0 @* L& B
; j+ Y9 {$ t* s% ]5 a& U- r |