Support » Fixing WordPress » Rss on page

  • Hello,
    I am kinda new to WP, and would like to find out how i can have an rss feed displayed on a page. (example: a bit like on the dashboard with the WP development blog)
    Hope its possible….

    thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • i just realised it can be done through a widget on the sidebar.. but how can i get it onto a page?

    i have tried a few plugins but non have worked… there must be some sort of code that can be insterted into a post to get rss feed….?
    I really need this feature… ahhhh

    Two options: use the plugin can write PHP code and run them, and other, adding directly the code to your theme.

    The code necesary to do this is like this:

    <?php
    include_once(ABSPATH . WPINC . '/rss.php');
    $rss = fetch_rss('YOUR_RSS_FEED_TO_BE_PARSED');
    $maxitems = 8;
    $items = array_slice($rss->items, 0, $maxitems);
    ?>

    When “YOUR_RSS_FEED_TO_BE_PARSED” is the URL address of the feed you want to fetch.

    Try, and tell me what’s happened.

    where do i need to add this code?
    I only want one particular page to display the feed…

    i cant enable any kind of widget as i dont have a sidebar… does that matter?
    I tried adding the code to the HTML part of the page, but it did nothing, just displayed the code…

    Its not HTML, you need to add them in the theme editor in any place you want to show.

    The widgets only support HTML Code, if you want to put them, you need a plugin to run PHP Scripts, but I can’t remember what’s the name of this plugin 😛 Try to find them in Google

    http://www.google.com/search?q=php+wordpress+run

    Or something like this 😛

    Hey Patrick,

    I tried adding the code you suggested directly to a Page Template, but it doesn’t seem to be drawing the feed, because the space is completely blank.

    Here’s the code I entered into the Page Template where PHP should be accepted:

    <?php
    include_once(ABSPATH . WPINC . '/rss.php');
    $rss = fetch_rss('http://www.livestrong.com/thedailyplate/diary/rss/Fokissed/');
    $maxitems = 8;
    $items = array_slice($rss->items, 0, $maxitems);
    ?>

    And here’s the page where it should be showing up, but it’s not:

    http://www.geek2freak.com/diet-log/

    Any help would be greatly appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Rss on page’ is closed to new replies.