我在我的wordpress站点有这个循环,它显示最新的帖子和他们的标题,我想在标题后显示帖子内容。我通常使用函数get_the_content检索它,但是我以各种方式打破整个页面,我对PHP很陌生,对如何在循环中添加任何东西几乎没有想法。这是循环:如何在此循环中显示函数the_content?
while ($q_query->have_posts())
{
$q_query->next_post();
$question = get_post($q_query->post);
$loophtml = $loophtml . "<li><span class='list-question-title'>" . "<a class='list-answer-link' href='" . get_permalink($question->ID) ."'>" . $question->post_title . "</a></span>";
$loophtml = $loophtml . "<span class='list-number-answers'>" . get_comments_number($question->ID) . " comentarios</span> · <a href='" . get_permalink($question->ID) ."'>Comentar</a>";
$loophtml = $loophtml . "</li>";
}
任何人都知道我如何添加内容的地方?由于
详细说明“无法使其工作”。怎么了? (或者考虑发布http://wordpress.stackexchange.com/) – mario 2010-12-18 20:12:23
对于ref:http://wordpress.stackexchange.com/questions/5600/how-do-i-display-the-function-the-content在这个循环 – t31os 2010-12-19 11:43:34