2011-01-12 76 views
0

內the_time(日期其實)我有一個循環,顯示最新的帖子。我想改變這種狀況說,部分:. get_comments_number($question->ID) .和而不是獲取日期。 (<?php the_time('F j, Y') ?>)獲取循環

這是循環:

$loophtml = $loophtml . "<span class='list-number-answers'>" . get_comments_number($question->ID) . " comentarios</span>&nbsp;&#183;&nbsp<a href='" . get_permalink($question->ID) ."'>Comentar</a>"; 

我不知道如何添加($ question-> ID)來the_time。任何人都可以幫我一把嗎?由於

回答

1

我認爲你正在尋找get_the_time,它返回的時間爲特定日期:

get_the_time('F j, Y', $question->ID) 

the_time只能在The Loop使用。