WordPress.org

Ready to get started?Download WordPress

Forums

2 blogs: want to include post titles from one into another (2 posts)

  1. blakekr
    Member
    Posted 7 years ago #

    Hi, I'm using wordpress 1.5.2. I have a Blogger blog, and I want to include the titles & links of, say, 5 of my latest posts from Blogger in the sidebar of my 1.5.2 WP blog. Probably this blog platform is too old for a plugin, but maybe not. Back in the dark ages, I used some kind of CARP solution, but it was not pretty. I was hoping there was a smoother way to approach this. Any suggestions?

  2. blakekr
    Member
    Posted 7 years ago #

    Hi again, I was wondering if someone could help me find a solution to this.

    I actually used some very simple code provided by one site:

    <?php require_once (ABSPATH . WPINC . '/rss-functions.php'); ?>
    <?php $today = current_time('mysql', 1); ?>
    <?php
    $rss = @fetch_rss('http://feeds.feedburner.com/somefeed');
    if ( isset($rss->items) && 0 != count($rss->items) ) {
    ?>
    <ul>
    <?php
    $rss->items = array_slice($rss->items, 0, 7);
    foreach ($rss->items as $item ) {
    ?>
    <li>
      <a href='<?php echo wp_filter_kses($item['link']); ?>' target='_blank'>
      <?php echo wp_specialchars($item['title']); ?>
      <small>.
        <?php echo human_time_diff( strtotime($item['pubdate'], time() ) ); ?>
        <?php _e('ago'); ?>
      </small>
    </li>
    <?php
    }
    }
    ?>

    Worked like a charm until feedburner (apparently) blocked my server for making too many requests.

    Clearly I need to find some kind of caching solution. My siet already caches pages but apparently it was not enough for feedburner.

Topic Closed

This topic has been closed to new replies.

About this Topic