I created a custom module for listing node and use the following code for rendering comment form
print comment_render($node->nid);
But it is only working for the first node only
I created a custom module for listing node and use the following code for rendering comment form
print comment_render($node->nid);
But it is only working for the first node only
First install and configure "Comment goodness" module - it will allow you to sort comments to display newest first.
Then in your template.php
create.
function THEME_preprocess_comment_wrapper(&$variables) {
// Remove pager.
unset ($variables['content']['comments']['pager']);
// Leave only latest comment.
$last_comment_id = reset(element_children($variables['content']['comments']));
$variables['content']['comments'] = array (
$last_comment_id => $variables['content']['comments'][$last_comment_id]
);
}