Title: Get recent comments
Last modified: August 21, 2016

---

# Get recent comments

 *  [Hannes17](https://wordpress.org/support/users/hannes17/)
 * (@hannes17)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/get-recent-comments-3/)
 * I am using the get_comments function to display all recent comments.
    Like this:
 *     ```
       <?php foreach (get_comments() as $comment): ?>
       <div><?php echo $comment->comment_author; ?> said: "<?php echo $comment->comment_content; ?>".</div>
       <?php endforeach; ?>
       ```
   
 * But the deviantart image doesn’t appear.
    How do I get it to appear?
 * Thank you!
 * [http://wordpress.org/plugins/deviantart-muro/](http://wordpress.org/plugins/deviantart-muro/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Hannes17](https://wordpress.org/support/users/hannes17/)
 * (@hannes17)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/get-recent-comments-3/#post-4357173)
 * Okay, here is the solution:
 * The image is added during the get_comment_text hook, accessing $comment->comment_content
   directly will bypass that hook (and break any other plugins that rely on the 
   hook too).
 * You’ve got two easy options though, either use get_comment_text($comment_ID) 
   or run the hook manually yourself by changing your code to <?php echo apply_filters(‘
   get_comment_text’, $comment->comment_content, $comment); ?>.

Viewing 1 replies (of 1 total)

The topic ‘Get recent comments’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/deviantart-muro.svg)
 * [deviantART muro](https://wordpress.org/plugins/deviantart-muro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/deviantart-muro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/deviantart-muro/)
 * [Active Topics](https://wordpress.org/support/plugin/deviantart-muro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/deviantart-muro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/deviantart-muro/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Hannes17](https://wordpress.org/support/users/hannes17/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/get-recent-comments-3/#post-4357173)
 * Status: not resolved