RSS Feed from one blog to another with images
-
Been working on this one for a bit and haven’t been able to fully complete this task, any help would be appreciated.
Here is the feed im working with
https://outdoors-international.com/store/product-tag/headwear/feed/The page that is using the data as test is here
https://gothunts.com/feed-test/I need it to display images from the feed on the page like the title is displaying.
Snippet of xml item code im trying to call in the feed test page<media:content xmlns:media="https://search.yahoo.com/mrss/" url="https://outdoors-international.com/store/wp-content/uploads/2013/06/Kryptek-Koldo-Rain-Jacket.png" width="1000" height="1000" medium="image" type="image/jpeg"> <media:copyright>Kyudo Gear by Outdoors International</media:copyright> </media:content>
Here is the custom page code I have been working with (feed-test page)
<?php // Get RSS Feed(s) include_once(ABSPATH . WPINC . '/rss.php'); $rss = fetch_rss('https://outdoors-international.com/store/product-tag/headwear/feed/'); $maxitems = 25; $items = array_slice($rss->items, 0, $maxitems); ?> <ul> <?php if (empty($items)) echo '<li>No items</li>'; else foreach ( $items as $item ) : ?> <div style="float:left;width:150px;height:225px;padding: 10px 10px 0px 0px;text-align: center;list-style-type:none;"> <li> <a href='<?php echo $item['link']; ?>' title='<?php echo $item['title']; ?>'><img src="<?php echo $item['media:content']; ?>"></a> <a href='<?php echo $item['link']; ?>' title='<?php echo $item['title']; ?>'> <?php echo $item['title']; ?></a> </li></div> <?php endforeach; ?> </ul> </div>
Question is how do I get the image url from the feed into the img src code on the page?
Thank you!
- The topic ‘RSS Feed from one blog to another with images’ is closed to new replies.