I'm trying to fetch some feeds using fetch_feed
, however, into the for foreach
, as the documentation says, I can access to values with common titles like title, permalink, etc using the get->
method, how can I access to those which looks like this:
<SO:AppId>617422</SO:AppId>
Where those :
generates error on my code. Any ideas?, the feed looks like this:
channel
title
link
image
title
url
item
SO:AppId
SO:AppName
SO:AppTime
I need to access those with the SO:
into a foreach
which using the get->SOMETHING
method.
UPDATE******
This is my function:
function get_external_feed($url, $number = 16) {
$rss = fetch_feed( $url );
if ( ! is_wp_error( $rss ) ) :
$maxitems = $rss->get_item_quantity( number );
$rss_items = $rss->get_items( 0, $maxitems );
return $rss_items;
endif;
}
and my foreach looks like this:
<?php if (count($feeds) == 0 ) : ?>
<h3>No upcomming dates so far, come back later for more!</h3>
<?php else : ?>
<?php foreach ( $feeds as $item ) : ?>
<?php $item->get->title(); ?>
<?php endforeach; ?>
<?php endif; ?>
fetch_feed
xmlns:
is "XML Namespace".