Skip to content

Instantly share code, notes, and snippets.

@Mehraban
Last active January 19, 2017 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mehraban/72b80c38ffe193b583886f3f126766ca to your computer and use it in GitHub Desktop.
Save Mehraban/72b80c38ffe193b583886f3f126766ca to your computer and use it in GitHub Desktop.
The second sample code in WordPress comments
<div id="comments">
<ul class="commentlist">
<?php
$all_comments=get_comments( array('status' => 'approve','orderby'=>'comment_date', 'number'=>'100') );
foreach ($all_comments as $cmt) {
mytheme_comment($cmt,array(
'type'=>'comment','avatar_size'=>'64'
));
}
?>
<?php
// wp_list_comments( 'type=comment&callback=mytheme_comment&avatar_size=64' );
?>
</ul>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment