Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="fcontent12">
- <?php
- global $comment;
- if ( $comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved='1' ORDER BY comment_date_gmt DESC LIMIT 5") ) :
- ?>
- <ul>
- <li><h2>Recent Comments</h2>
- <ul>
- <?php
- foreach ($comments as $comment) {
- echo '<li>' . sprintf('%s <span style="text-transform: lowercase;"> on - </span>%s', get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>');
- echo '</li>';
- }
- ?>
- </ul>
- </li>
- </ul>
- <?php endif; ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement