2011-01-26 70 views
1

嘿家伙! 所以,我有这个问题:wordpress留言文件

我正在与wordpress做一个博客,但我有点评论的源文件的麻烦。在原始的wordpress主题(二十TEN的主题)生成的HTML代码基本上是这样的:

<ol class="commentlist"> 
<li class="comment even thread-even depth-1" id="li-comment-15"> 
    <div id="comment-15"> 
     <div class="comment-author vcard"> 
      <img alt='' src='http://1.gravatar.com/avatar/1e1122c513d8fa172232b1acafe1cf83?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G' class='avatar avatar-40 photo' height='40' width='40' /> 
      <cite class="fn"> 
       <a href='http://www.webtiago.com' rel='external nofollow' class='url'>John Doe</a> 
      </cite> 
      <span class="says">says:</span> 
     </div><!-- .comment-author .vcard --> 

     <div class="comment-meta commentmetadata"> 
      <a href="http://localhost/wordpress/wordpress/?p=88#comment-15">26 de January de 2011 at 12:17</a> 
     </div><!-- .comment-meta .commentmetadata --> 

     <div class="comment-body"> 
      <p>Adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> 
     </div> 

    <div class="reply"> 
     <a rel='nofollow' class='comment-reply-link' href='/wordpress/wordpress/?p=88&#038;replytocom=15#respond' onclick='return addComment.moveForm("comment-15", "15", "respond", "88")'>Reply</a>  </div><!-- .reply --> 
    </div><!-- #comment-## --> 
</li> 

所以,我需要的是插入与类“股利之间一个新的div comment-元评论元数据“和类”评论身体“的div。

我已经试过在'comment-template.php'文件中编辑它,但没有成功(显然这不是正确的文件)。

谁能告诉我哪个文件是正确的?

问候! ;)

回答

2

WordPress允许您指定的注释布局callback,在twentyten它做这样的情况:

wp_list_comments(array('callback' => 'twentyten_comment')); 

回调twentyten_commentfunctions.php定义。