Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $comments_query = new WP_Comment_Query;
- $comments = $comments_query->query( 'status=approve&number=10' );
- if ( $comments ) {
- foreach ( $comments as $comment ) { ?>
- <a href="<? echo get_permalink($comment->comment_post_ID) ?>" title="Статья <? echo get_the_title($comment->comment_post_ID) ?>">
- <p class="<? if ($comment->user_id == 1) { echo 'author';} else {echo 'reader';} ?>"><? echo $comment->comment_author . ": " . $comment->comment_content; ?></p></a>
- <? }}; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement