My point is: show posts last commenter name and comment date d F H:i
together. Any suggestions?
I think what you want is:
$defaults = array(
'post_id' => $post->ID,
'number' => '1',
'orderby' => 'comment_date_gmt ', // default value; not really necessary
'order' => 'DESC',
'status' => 'approved',
);
You shouldn’t need to run get_comments()
twice.
$defaults = array(
'post_id' => 120,
'number' => '1',
'orderby' => 'comment_date_gmt ', // default value; not really necessary
'order' => 'DESC',
'status' => 'approved',
);
$comments = get_comments($defaults);
if (!empty($comments[0])) {
$comments = $comments[0];
comment_author($comments->comment_ID);
comment_date('d F H:i', $comments->comment_ID);
}