2012-03-15 58 views
0

我試圖恪守關於修改註釋表單(位於here)外觀的說法,但我無法讓它正常工作。儘管我應該改變它的參數數組,但是出現了默認的註釋表單。WordPresspress comment_form()不會接受我的論點

在模板中,我有:comments_template('mycomments.php');

則...

<?php 
    //inside my mycomments.php file 

$comment_args = array (
    'fields' => array('author', 'email'), 
    'must_log_in' => true, 
    'title_reply' => 'Review this product', 
    'label_submit' => 'Submit', 
); 
comment_form($comment_args, $post->ID); ?> 

難道我做錯了什麼?

+0

你會得到什麼錯誤? – seferov 2012-03-15 14:57:54

+0

沒有錯誤。我只是得到了默認評論表單:「留下一個回覆...」 – emersonthis 2012-03-15 16:46:27

回答

0

我想通了。我的論點沒有錯。相反,......我需要一個/盈相對鏈接到我的定製評論模板:

comments_template('/mycomments.php');

這個故事告訴我們:如果你遇到麻煩模板的工作(的話),使確定你實際上正在加載正確的模板文件!