WordPress.org

Ready to get started?Download WordPress

Forums

Fatal error: Call to undefined function fetch_feed() (1 post)

  1. Pollen Brands
    Member
    Posted 4 years ago #

    I'm getting this Fatal Error: Fatal error: Call to undefined function fetch_feed()
    with the code below. The file is in my theme folder/assets/xml/

    The fetch_feed function is currently working fine in my index.php theme file.

    Any ideas why this is happening? Thanks!

    <?php
    include_once('http://lht.addvida.com/wp-includes/feed.php');
    $products = fetch_feed("http://lht.addvida.com/?page_id=3&wpsc_action=rss");
    $items = $products->get_items(0, 5);
    foreach ( $items as $item ) : ?>
    <tour>
    <title><?php echo $item->get_title(); ?></title>\n<description><?php echo $item->get_description(); ?></description>\n<image><?php echo $item->get_image(); ?></image>\n<price><?php echo $item->get_price(); ?></price>
    </tour>
    <?php endforeach; ?>
    </tours>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.