Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Последние комментарии
- function nlt_getComments($count=5){
- $args = array(
- 'status' => 'approve',
- 'number' => $count
- );
- $comments = get_comments($args);
- $output = '<ul>';
- foreach ($comments as $comment){
- $output .= sprintf('<li><a href="%s"><span>%s:</span> %s</a></li>', get_permalink($comment->comment_post_ID).'#disqus_thread', $comment->comment_author, get_the_title($comment->comment_post_ID));
- }
- $output .= '</ul>';
- echo $output;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement