Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

WordPress RSS feed reader with option for custom elements.

Hello,

Is there some way to read the following external XML RSS feed that is in a given URL:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <item>
            <title>PlayerName01</title>
            <R2_UID>49373</R2_UID>
            <city_state_country>Cd. Juarez, CH MEX</city_state_country>
            <gender>Male</gender>
            <player_image></player_image>
            <rank>1</rank>
            <ranking_points>13220</ranking_points>
            <advantage>3495</advantage>
            <events_played>11</events_played>
        </item>
        <item>
            <title>PlayerName02</title>
            <R2_UID>32507</R2_UID>
            <city_state_country>Marine, MN USA</city_state_country>
            <gender>Male</gender>
            <player_image></player_image>
            <rank>2</rank>
            <ranking_points>9725</ranking_points>
            <advantage>2145</advantage>
            <events_played>11</events_played>
        </item>
        ...
        ...
        ...
        ...
    </channel>
</rss>

The idea is to read it and put the feed inside a page or widget. However, the problem is that the feed contains custom elements, while all the plugins I've seen so far just allow to retrieve the information from the elements: <title>, <description>, <date>, and <link>, and as you can see the feed just has the title and the others are custom elements. I don't have access to modify the feed, which means I need to try to fit to it. Any ideas?

1 Answer

Sam Katz
Sam Katz
2,986 Points

my question too.