March 13, 2007

  • booo! stupid $wpdb class

    OK-ok. Ronald was right. I don't need no stinkin' help from nobody. (well actually, nobody even tried)

    had to turn to the dark side on this one. I ended up using the built-in fetch_rss function.

    <?php require_once('blah..blah/wp-includes/rss.php'); ?>
    <?php $rss = fetch_rss('your feed here');
    $ijk = 0;
    ?>

    <?php foreach ( $rss->items as $item ) : ?>
    <?php print ("• ");?>
    <a href='<?php echo $item['link']; ?>'
    title='<?php echo $item['title']; ?>'>
    <?php echo $item['title']; ?>
    </a>
    <br /?>
    <?php
    $ijk++;
    // i want to limit the results to 5
    if ($ijk == 5) {
    break;
    } ?>
    <?php endforeach; ?>

    yeah .. yeah the code looks a little sloppy but it works.

    Check out the implementation.

    http://www.sjbci.org/

    In the sidebar, you can see both the now populated Devotions Box and News & Announcements Box. All contents in that box are now dynamic. Entries for Devotions can be found here and News can be found here.

    For those faint of heart, I can now pull all YB's RSS Feeds and show them on a page where your parents can read what you are up to. Keep in mind that it doesn't matter if you have your site protected or not. - I was looking for the smiley with horns but can't find any so ... in the words of jake, whateber.

Comments (4)

Comments are closed.

Post a Comment