fecth_feed(custom_field url) not working (1 post)

  1. danazz09
    Posted 5 years ago #


    I am creating a website that gathers rss feeds from various sources and displays them by topic on different pages. I am creating my own template pages. I am trying to use 1 template for each page and then just have the feed url change dynamically using a custom field that I created on each page within WordPress.

    Here's a snippet of my code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    So when this runs, rather then displaying the permalink and the title of each feed, it is simply printing out the url - http://feeds.feedburner.com/example - one and then stops. I am not sure whether you can have a url address as a custom field or not. Any advice would be greatly appreciated.

    When I sue an actual URL $afl_link = fetch_feed('http://www.examplefeed.com'); instead of $afl_link = fetch_feed($url); it works fine.

Topic Closed

This topic has been closed to new replies.

About this Topic