• I’m starting up a state organization website using WordPress and then many small county chapter websites also using WordPress. I wanted to have a spot in the sidebar or something that is able to show “County Updates”. Basically, if a county website updates their WordPress, I’d like to have the State website just link to that new post.

    Is this doable with RSS or something?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I grabbed the RSS aggregator from the Dashboard and, with the help of another topic in this support forum (thanks for telling me about that require_once business), here you go:

    <?php
    require_once (ABSPATH . WPINC . '/rss-functions.php');

    // change this to whatever feed you want displayed
    $rss = @fetch_rss('https://planet.www.ads-software.com/feed/&#39;);

    if ( isset($rss->items) && 0 != count($rss->items) ) {

    // change this to whatever you want it titled
    ?>
    <h3><?php _e('Other WordPress News'); ?> <a href="https://planet.www.ads-software.com/">&lt;?php _e('more'); ?> &raquo;</a></h3>

    <ul>
    <?php
    // change the number "20" to the number of items you want displayed
    $rss->items = array_slice($rss->items, 0, 20);

    foreach ($rss->items as $item ) {
    ?>
    <li><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a></li>
    <?php
    }
    ?>
    </ul>

    <?php
    }
    ?>

    If you use something that will combine all of your various feeds into one (https://feedjumbler.com/, https://www.rssmix.com/, do a Google search for it), you should be pretty well set.

    Yet another post here on the forum might provide even more answers.

    you can also try CG-FeedRead, which has been discussed a bunch of late. Can do individual feeds, or a multifeed (intermixed by timestamps), single function call. takes less effort than the code above (but less ‘customization’ and control.. in the current release… ?? ).

    -d

    Thread Starter tswartz

    (@tswartz)

    Cool, thanks for the quick reply guys. I’ll try it when I get that far into the project. ??

    I just tried this code again and there’s something missing. Here’s the new code that works with 2.0… on a pastebin page because pasting code with link HTML in it is a gigantic problem on this forum. Ahhh!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘RSS question (maybe)’ is closed to new replies.