2012-05-28 18 views
0

這裏是我的single.phpcomment_form()不工作

<?php get_header(); ?> 

<?php 

if (have_posts()) : 
    while (have_posts()) : the_post(); 
     the_content(); 
     comments_template(); 
    endwhile; 
endif; 
?> 


<?php get_footer(); ?> 

這是我的comments.php

<h2>Comments</h2> 

<?php 
wp_list_comments(); 
comment_form(array('title_reply'=>'Leave a Comment', 
        'comment_notes_before'=>'', 
        'comment_notes_after'=>'')); 
?> 

wp_list_comments()工作正常,但comment_form()回報什麼。我怎樣才能讓評論表單出現?

+0

您是否驗證過正在使用single.php模板? – Jrod

+0

是的。正如我所說,wp_list_comments()的作品,唯一的地方comments.php是引用來自single.php。 –

回答

2

原來,對於我從另一個WordPress實例導入的一些(但不是全部)帖子,評論被禁用。一旦我啓用了評論,這些功能就能正常工作。

+1

有趣的是,我有完全相同的問題。如果你偶然發現這一點,請確保評論不僅適用於整個網站,還適用於你正在嘗試的特定帖子! –