Title: fetch_rss url problem
Last modified: August 18, 2016

---

# fetch_rss url problem

 *  [hitokiri](https://wordpress.org/support/users/hitokiri/)
 * (@hitokiri)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/fetch_rss-url-problem/)
 * Hi
    I´m using fetch_rss function to display some headlines of other blogs at 
   the bottom of my blog. I´m using the function as explained on the wiki: <?php
   require_once(ABSPATH . WPINC . ‘/rss-functions.php’); $rss = fetch_rss(‘[http://example.com/rss/feed/goes/here&#8217](http://example.com/rss/feed/goes/here&#8217););
   echo ‘
    - ‘;
       foreach ( $rss->items as $item ) { echo ‘
    - 
    - ‘;
       } echo ‘
 * ‘;
    ?>
 * and everything seems OK
 * But when I click on a headline, and I´m supossed to go to the articles post, 
   URL appears wrong. I get something like this:
    [http://labs.valechumbar.com/](http://labs.valechumbar.com/)\%
   22http://feeds.feedburner.com/~r/Muyriver/~3/41656566/\%22
 * The first http:// is my blog (where the fetch_rss actually is), and the second
   one the rss blog where I´m supossed to be linked to.
    When I click there I just
   return to my own blog, not going to the destination one
 * Any ideas on how to fix this?
 * Thanks in advance

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

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 7 months ago](https://wordpress.org/support/topic/fetch_rss-url-problem/#post-471136)
 * Something is wrong with your code. You need to post *exactly* what your code 
   looks like, instead of posting the wiki example again.
 * Also, when you post code, put it between backticks (that’s the character below
   the tilde ~ ) so that we can actually see it.
 *  Thread Starter [hitokiri](https://wordpress.org/support/users/hitokiri/)
 * (@hitokiri)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/fetch_rss-url-problem/#post-471167)
 * :s I didn´t realize i posted the code wrond
    There it goes again:
 * `<?php
    require_once(ABSPATH . WPINC . '/rss-functions.php'); $rss = fetch_rss('
   http://feeds.feedburner.com/Muyriver'); echo '<ul>'; for($i=0;$i<5;$i++) { $item
   =$rss->items[$i]; echo '<li><a href=\"' . $item['link'] . '\" title=\"' . $item['
   title'] . '\">' . $item['title'] . '</a></li>'; } echo '</ul>'; ?>
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 7 months ago](https://wordpress.org/support/topic/fetch_rss-url-problem/#post-471183)
 * Ah. Okay. I was not aware that the wiki had screwed up the backslashes. All those
   backslashes in the echo line… You don’t need ’em.
 * Try this code:
 * `<?php
    require_once(ABSPATH . WPINC . '/rss-functions.php'); $rss = fetch_rss('
   http://feeds.feedburner.com/Muyriver'); echo '<ul>'; for($i=0;$i<5;$i++) { $item
   =$rss->items[$i]; echo '<li><a href="' . $item['link'] . '" title="' . $item['
   title'] . '">' . $item['title'] . '</a></li>'; } echo '</ul>'; ?>
 *  Thread Starter [hitokiri](https://wordpress.org/support/users/hitokiri/)
 * (@hitokiri)
 * [19 years, 7 months ago](https://wordpress.org/support/topic/fetch_rss-url-problem/#post-471212)
 * Great!
 * Now it workd perfectly. We should correct the wiki
 * Thank you very much Otto
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 7 months ago](https://wordpress.org/support/topic/fetch_rss-url-problem/#post-471215)
 * Okay, I modified the Wiki. Appearantly, the wiki always adds backslashes to double
   quote marks like that. Annoying.

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

The topic ‘fetch_rss url problem’ is closed to new replies.

## Tags

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

 * 5 replies
 * 2 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [19 years, 7 months ago](https://wordpress.org/support/topic/fetch_rss-url-problem/#post-471215)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
