Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Here is my comments.php: http://pastebin.com/E5bz4aaW

The problem is that the threaded comment (the reply) showing my post date instead if the comment date. I checked in the database and it looks fine there. The date is the same but the time is good(11:13)

Example: http://cl.ly/0W2P1b0c2N0W151v1E1d/Screen%20Shot%202012-03-16%20at%2012.49.33%20PM.png

In my comments.php i can't find my threaded comment syntax, its probably in the comment_text() function, right? How can i edit that to make this problem disappear?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Try to use the wp_list_comments function:

http://codex.wordpress.org/Function_Reference/wp_list_comments

It allows you to control the aspect of every comment, also the replies. Then, you define a callback function, which will be called when Wordpress creates each comment.

Your callback needs to start like this:

function commnents_callback($comment, $args, $depth) {
  $GLOBALS['comment'] = $comment;   
  global $post;

  // your HTML + PHP comment creation code here
}

Then, you can create the comments by using this code:

<?php if( $comments ): ?>
<ul>
<?php wp_list_comments('type=comment&callback=commnents_callback'); ?>
</ul>
<?php endif; ?>

Using this, you can control the creation of every comment.

share|improve this answer
    
Tried that, i copied the callback from twentyten and its the same, the date is wrong:( –  passatgt Mar 19 '12 at 10:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.