WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to display feeds from a couple of my blogs using the build in function fetch_feed() however I stumbled across a few problems.

I am storing the rss urls in the links section and will be calling the link_rss as the input for fetch_feed(). I know that I would have to deal with an array, perhaps nested arrays??

Can someone be kind enough to give me a way of pulling all the link_rss fields into one single variable which can be use for fetch_feed()??

Having the variable in the form of an array would be great so I can just plug it in to the function like so fetch_feed($variable).

Any help would be greatly appreciated. Thanks!!

share|improve this question

Possible, only I am not entirely sure about specifics of looping through multi-feed SimplePie object. Customize get_bookmarks() call to query for links you need.

$bookmarks = get_bookmarks();
$feeds = array();

foreach($bookmarks as $bookmark)
        $feeds[] = $bookmark->link_rss;

$items = fetch_feed($feeds);
share|improve this answer

Short answer: No.

fetch_feed() expects an URL, so you basically need to create a URL that will return link_rss data in form of RSS-Feed while being requested via HTTP. That looks too complicated in my eyes.

Filtering the fetch_feed() function is too complicated as well. Probably injecting the feed using the data: url scheme might do some magic, but I assume that SimplePie might not deal with that.

share|improve this answer
Nope, fetch_feed() uses SimplePie->set_feed_url() that accepts mixed input of single URL or array of URLs. – Rarst Jan 25 '11 at 7:14
@Rarst: You see some chance to make use of that for something usefull? I did understand the asker that he wants to have a feed consisting of his links and not the feeds on his links. – hakre Jan 25 '11 at 16:24
ehm, I interpreted question as how to produce combined feed of several sources. I don't see anything about producing feed in question, only about fetching?.. – Rarst Jan 25 '11 at 16:35
@rarst: well then, you answer should be doing the job. I might just got the question wrong. – hakre Jan 25 '11 at 18:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.