2012-12-20 5 views
0

캘린더를 클릭하고 게시물을 가져 오는 날짜를 변경하려고합니다.최근 게시물 변경 주요 뉴스 날짜

현재 제목은 Y, m, d입니다 (2012 년 12 월 20 일). 나는 그것을 (F, J, Y) (2012 년 12 월 20 일 목요일)로 변경하고 싶습니다.

이 변경 작업을 위해 어떤 PHP Wordpress 파일을 조작합니까? functions.php 에서 아래 기능

건배

답변

0

단지 대체 한 일을하시기 바랍니다 기능 twentyeleven_posted_on()는 당신에게 당신이 필요로하는 날짜 형식을 줄 것이다 바랍니다.

function twentyeleven_posted_on() { 
    printf(__('<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven'), 
     esc_url(get_permalink()), 
     esc_attr(get_the_time()), 
     esc_attr(get_the_date('l, F j, Y')), 
     esc_html(get_the_date()), 
     esc_url(get_author_posts_url(get_the_author_meta('ID'))), 
     esc_attr(sprintf(__('View all posts by %s', 'twentyeleven'), get_the_author())), 
     get_the_author() 
    ); 
} 
+0

안녕하세요. Praveen kalal 메시지를 보내 주셔서 감사합니다. 변경하기 전에 질문을해야합니다. 이것이 내가 사용하고있는 테마에서하지 않아야합니까? 그리고 twententleven 테마가 아닌가요? – TLCJohn

+0

좋아, 그냥 함수를 호출하는 functions.php에서 get_the_date() 및 get_comment_date()를 get_the_date ('l, F j, Y') 및 get_comment_date ('l, F j, Y')로 바꿉니다. –

관련 문제