• 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('https://lht.addvida.com/wp-includes/feed.php');
    $products = fetch_feed("https://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>
  • The topic ‘Fatal error: Call to undefined function fetch_feed()’ is closed to new replies.