• Hi there!

    I want to ask, how do show the picture in the feed?
    I search on google but can not hopefully. I like the following example script I plug in frontand.

    <?php if(function_exists('fetch_feed')) {
    	include_once(ABSPATH . WPINC . '/feed.php'); // the file to rss feed generator
    	$feed = fetch_feed(array(
    	'http://news.domain.com/feed/'
    	)); // specify the rss feed
    	$feed->set_cache_duration (999); // specify cache duration in seconds
    	$limit = $feed->get_item_quantity(7); // specify number of items
    	$items = $feed->get_items(0, $limit); // create an array of items
    }
    if ($limit == 0) echo '<div>The feed is either empty or unavailable.</div>';
    else foreach ($items as $item) : ?>
    <li>
    <h2><a href="<?php echo $item->get_permalink(); ?>" alt="<?php echo $item->get_title(); ?>">
    <?php echo $item->get_title(); ?></a></h2>
    <span><time><?php echo $item->get_date('j F Y g:i a'); ?></time></span>
    </li>
    <?php endforeach; ?>

    Thanks.

  • The topic ‘How to show thumb site feed ?’ is closed to new replies.