1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RSS aggregator for wordpress?

Discussion in 'Blogging' started by seekman, Jun 3, 2011.

  1. seekman

    seekman Regular Member

    Joined:
    Mar 3, 2010
    Messages:
    416
    Likes Received:
    20
    Location:
    Europe
    Home Page:
    Hello,

    there is a plenty of WP plugins that make RSS feed display, however none of them works! None is supported in the 3.1.3 :(

    Can you suggest me how to put a customizable RSS reader whereever I want in the WP (eg. after posts), but not in the sidebars/widgets.

    I need some code to put in the php theme files.


    Free or very cheap solution... please help
     
  2. flexnds

    flexnds Power Member

    Joined:
    Jan 4, 2010
    Messages:
    643
    Likes Received:
    680
    Occupation:
    Internet Marketing, Web development, Internet Repu
    Location:
    AZ
    PHP:
    <?php include_once(ABSPATH.WPINC.'/feed.php');
    $rss fetch_feed('http://somewhere.com/auctionsalefeed.xml');
    $maxitems $rss->get_item_quantity(30);
    $rss_items $rss->get_items(0$maxitems);
    ?>
    <ul>
    <?php if ($maxitems == 0) echo '<li>No items.</li>';
    else
    // Loop through each feed item and display each item as a hyperlink.
    foreach ( $rss_items as $item ) : ?>
    <li>
    <a href='<?php echo $item->get_permalink(); ?>'
    title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
    <?php echo $item->get_title(); ?></a>
    </li>
    <?php endforeach; ?>
    </ul>
    Works great for me.. Check out wordpress docs for more.. You can do quite a few variations including displaying as text only, etc...
     
  3. seekman

    seekman Regular Member

    Joined:
    Mar 3, 2010
    Messages:
    416
    Likes Received:
    20
    Location:
    Europe
    Home Page:
    it works!! do you know how to add some text of the feed under each title?
    Or where I can find these info?