Title: Customizing Recent Comments Widget
Last modified: August 18, 2016

---

# Customizing Recent Comments Widget

 *  [spiritofburning](https://wordpress.org/support/users/spiritofburning/)
 * (@spiritofburning)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/customizing-recent-comments-widget/)
 * I am currently running 2.1.1 using the Recent Comments Widget. Under my current
   site, I use a page for discussion among different people. Therefore, I am found
   commenting on my own posts.
 * However, when I comment on my own posts it displays that on the Recent Comments
   widget, displayed on my sidebar.
 * Is it possible to add a switch that will exclude personal comments so that only
   non-admin comments are displayed on the widget?
 * Right now I am looking at widget/widget.php:
 *     ```
       <?php
       }
   
       function widget_recent_comments_control() {
       	$options = $newoptions = get_option('widget_recent_comments');
       	if ( $_POST["recent-comments-submit"] ) {
       		$newoptions['title'] = strip_tags(stripslashes($_POST["recent-comments-title"]));
       	}
       	if ( $options != $newoptions ) {
       		$options = $newoptions;
       		update_option('widget_recent_comments', $options);
       	}
       	$title = htmlspecialchars($options['title'], ENT_QUOTES);
       ?>
       			<p><label for="recent-comments-title"><?php _e('Title:'); ?> <input style="width: 250px;" id="recent-comments-title" name="recent-comments-title" type="text" value="<?php echo $title; ?>" /></label></p>
       			<input type="hidden" id="recent-comments-submit" name="recent-comments-submit" value="1" />
       <?php
       ```
   
 * Would I change something here?

Viewing 1 replies (of 1 total)

 *  [WarPig](https://wordpress.org/support/users/warpig/)
 * (@warpig)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/customizing-recent-comments-widget/#post-540587)
 * spiritofburning, try the GetRecentComments widget which you can get [here](http://blog.jodies.de/archiv/2004/11/13/recent-comments/).
   It has a lot of great options, including the ability to exclude Blog author comments.

Viewing 1 replies (of 1 total)

The topic ‘Customizing Recent Comments Widget’ is closed to new replies.

## Tags

 * [recent](https://wordpress.org/support/topic-tag/recent/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 2 participants
 * Last reply from: [WarPig](https://wordpress.org/support/users/warpig/)
 * Last activity: [18 years, 3 months ago](https://wordpress.org/support/topic/customizing-recent-comments-widget/#post-540587)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
