以下代碼輸出帖子標題列表。在此列表下方,它還會輸出與類別8中的標籤「test」匹配的每個完整帖子。爲什麼它會輸出完整帖子?我如何防止這種情況發生?爲什麼WordPress的循環輸出完整的帖子?
$query_str = "cat=8&tag=test";
query_posts($query_str);
while (have_posts()) : the_post();
echo '<div><a href="';
the_permalink();
echo '">';
the_title();
echo '</a></div>';
endwhile;
你的意思是它的輸出'the_content'呢? – 2013-03-15 15:26:55
是的,但沒有標題。 – 4thSpace 2013-03-15 15:28:04