Title: Replace string in RSS Widget?
Last modified: August 19, 2016

---

# Replace string in RSS Widget?

 *  [creinhardt](https://wordpress.org/support/users/creinhardt/)
 * (@creinhardt)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/replace-string-in-rss-widget/)
 * Im using the default wordpress RSS widget to pull in a feed of what TV shows 
   are currently playing on a small TV station. For reasons beyond my control, whenever
   this TV station plays a certain file, the feed calls it “NA”. I have no control
   over the feed, so I was wondering if it would be possible to use some php to 
   replace that specific string with something else. I’ve found some php that would
   let me do this
 *     ```
       <?php
   
       // The text string
   
       $text = "The quick brown fox jumped over the lazy dog.";
   
       // The word we want to replace
   
       $oldWord = "brown";
   
       // The new word we want in place of the old one
   
       $newWord = "blue";
   
       // Run through the text and replaces all occurrences of $oldText
   
       $text = str_replace($oldWord , $newWord , $text);
   
       // Display the new text
   
       echo $text;
   
       ?>
       ```
   
 * but i’m not sure where i’d need to put that in my wordpress files, or what variables
   i’d use to change the rss description. Can anyone help me out with this? For 
   an example, go to [http://www.yourconcordtv.org/wptest/](http://www.yourconcordtv.org/wptest/)
   and look at the ‘Now Playing’ section on the sidebar.

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

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [18 years, 4 months ago](https://wordpress.org/support/topic/replace-string-in-rss-widget/#post-689947)
 * You could do that, but using a Yahoo Pipe might be simpler.
 * [http://pipes.yahoo.com/](http://pipes.yahoo.com/)
 * It lets you take a feed or set of feeds, do any sort of things to it that you
   want using a simple interface, and then create a new feed from that which you
   can then use as any other feed.
 *  [mikelizzio](https://wordpress.org/support/users/mikelizzio/)
 * (@mikelizzio)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/replace-string-in-rss-widget/#post-690213)
 * does google offer something similar?
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/replace-string-in-rss-widget/#post-690214)
 * one option would be to use the widget_content filter that my plugin offers
 * [http://wordpress.org/extend/plugins/widget-logic/](http://wordpress.org/extend/plugins/widget-logic/)

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

The topic ‘Replace string in RSS Widget?’ is closed to new replies.

## Tags

 * [RSS](https://wordpress.org/support/topic-tag/rss/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * 3 replies
 * 4 participants
 * Last reply from: [alanft](https://wordpress.org/support/users/alanft/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/replace-string-in-rss-widget/#post-690214)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
