You are here:  » rss feed and image


rss feed and image

Submitted by wilkins on Thu, 2018-08-16 08:20 in

Hi David

I have a rss feed that has worked OK for years, however, I need to have the image listed in the rss for a new project, as you can see at present its embedded in the description, this is OK, but I now need a separate reference for the image. Is this possible with this rss?.

regards

Brent

{code saved}

Submitted by support on Thu, 2018-08-16 09:37

Hello Brent,

Based on the RSS standard image element, where you currently have;

      print "<description><![CDATA[";
      print "<img src='".$product["image_url"]."' /><br />";
      print "<p>".$product["description"]."</p>";
      print "]]></description>";

...REPLACE with:

      print "<description><![CDATA[";
      print "<p>".$product["description"]."</p>";
      print "]]></description>";
      print "<image>";
        print "<url><![CDATA[".$product["image_url"]."]]></url>";
        print "<title>".$product["name"]."</title>";
        print "<link>".$href."</link>";
      print "</image>";

Cheers,
David.
--
PriceTapestry.com