Forum
Setting up an RSS Feed
Hi!
I need some help setting up an RSS feed to my site. My client uses a shelter manager and wants to integrate their rss onto the site (https://public.sheltermanager.com/animals/gw1124/rss.xml). So I've followed the docs and I'm just a bit confused at where I reference where the feed is coming from?
So I've set up the rss.php page
<?php include('admin/runtime.php'); ?>
<?php echo '<'.'?xml version="1.0"?'.'>'; ?>
<rss version="2.0">
<channel>
<title>Available for Adoption</title>
<link>https://backwell.web-design.wales/available-for-adoption.php</link>
<description>Animals Available for Adoption at Llys Nini</description>
<?php
$opts = array(
'page'=>'/available-for-adoption.php',
'template'=>'_rss_item.html'
);
perch_content_custom('Available for Adoption', $opts);
?>
</channel>
</rss>
And I've also added this to the available-for-adoption.php page
<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.php" />
Can someone point me in the right direction to tell me what to do?
Thank you!
What do you mean by this?
The RSS is on a thrid party site, so where do I state where the RSS is coming from?
The docs are for creating an RSS feed from your content, not consuming a third party one.
So I can't do it?
Hi Jade, it is possible to do this, but it's not Perch related. I will dig out my notes and let you know how I did it on another project.
If you could that would be appreciated. Thanks Simon!
Hi Jade, could you just clarify what result you are after?
Are you trying to show an external feed (https://public.sheltermanager.com/animals/gw1124/rss.xml) as a listing on a page on your website?
That's right yes. It will basically be split up into dogs, cats and small animals. Each category will then show a gallery of the animals clicking off onto a details page for them
Hi Simon, did you get chance to find the code for me?
Thanks
Hi Jade,
This code will pull the info from the feed and display it onto your page: