我在WordPress內容之外的靜態HTML頁面上顯示WordPress內容。它工作得非常好,我只需要一個元素來完成設置。WordPress - 如何顯示來自條目的評論總數?
我使用這個代碼:
<?php while (have_posts()): the_post(); ?>
<h5><?php the_title(); ?></h5>
<p class="blog-info"><?php the_time('m'); ?>.<?php the_time('j'); ?>.<?php the_time('y'); ?> | <a class="comment-ref">13 Comments</a></p>
<?php endwhile; ?>
的最後一部分,我需要在這裏你可以看到與該項目相關的意見總數的鏈接部分。這樣的事情:
<a class="comment-ref">13 Comments</a>
我對WordPress不是很熟悉,所以我可以使用一些幫助獲取最後一點代碼。
謝謝!
是的,comments_number是要走的路。 http://codex.wordpress.org/Function_Reference/comments_number – 2010-07-21 13:43:47
優秀。完美工作!謝謝。 – fmz 2010-07-21 13:46:16