} } ?> </h3> <!-- comments --> <ul id="comments" class="clearfix"> <?php // for WordPress 2.7 or higher if (function_exists('wp_list_comments')) { wp_list_comments('callback=list_comments'); } else { // for WordPress 2.6.3 or lower foreach ($comments as $comment) { //if($comment->comment_type != 'pingback' && $comment->comment_type != 'trackback') list_comments($comment, null, null); } } ?> </ul> <?php } else { ?> <h3 class="comments"><?php _e('No comments yet.', 'arclite'); ?> </h3><?php } ?> <?php
function comments_update($pid) { //Updated comments list on AJAX call $start_pos = strpos(list_comments($pid), '<!-- Start comments of post ' . $pid . ' -->'); return substr(list_comments($pid), $start_pos, -6); }