Title: adding filter to rss widget?
Last modified: August 19, 2016

---

# adding filter to rss widget?

 *  [multiplier](https://wordpress.org/support/users/multiplier/)
 * (@multiplier)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/adding-filter-to-rss-widget/)
 * Long story, but I would like to change the class on the anchors within the rss
   widget to another class called “special_name”. I thought this would work, but
   no luck –
 *     ```
       function edit_anchor($anchor) {
       return preg_replace('/<a class='rsswidget'/', '<a class='special_name'', $anchor, 1);
       }
       add_filter('wp_widget_rss','edit_anchor');
       ```
   
 * Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [multiplier](https://wordpress.org/support/users/multiplier/)
 * (@multiplier)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/adding-filter-to-rss-widget/#post-1051294)
 * Hmm, I’ve tried other filtering like this with different functions (ex: wp_page_menu)
   and it worked fine. Any idea why wp_widget_rss would be any different?
 *  [llamaman](https://wordpress.org/support/users/llamaman/)
 * (@llamaman)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/adding-filter-to-rss-widget/#post-1051376)
 * Did you figure this out? I am wondering the same thing. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘adding filter to rss widget?’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [llamaman](https://wordpress.org/support/users/llamaman/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/adding-filter-to-rss-widget/#post-1051376)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
