The MU forums have moved to WordPress.org

How to set dynamic dashboard feeds (3 posts)

  1. Farms2
    Member
    Posted 17 years ago #

    OK, here's a brain teaser...

    I reckon WPMU should be installed so that the main dashboard feed pulls in the latest posts from the main site (mywpmuinstall.com) and the planet pulls in latest posts from around the site - using the wpmu feed install.

    To get this I figure you need to edit index.php but my php skills aren't such that I can figure out how to call the 'home' url of the wpmu install into fields such as the below:

    <?php
    $rss = @fetch_rss('http://wordpress.org/development/feed/');
    if ( isset($rss->items) && 0 != count($rss->items) ) {
    ?>
    <div id="devnews">
    <h3><?php _e('Latest site news'); ?></h3>
    <?php
    $rss->items = array_slice($rss->items, 0, 3);
    foreach ($rss->items as $item ) {
    ?>
    <h4><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a> — <?php printf(__('%s ago'), human_time_diff(strtotime($item['pubdate'], time() ) ) ); ?></h4>
    <?php echo $item['description']; ?>
    <?php
    }
    }
    ?>

    Any help would make my weekend a very happy one :)

    Cheers, James

  2. dsader
    Member
    Posted 17 years ago #

    To put your "planet" feed in everyone's dashboard replace http://wordpress.org/development/feed/ with <http://you.can.do.it/triggerblogID/wpmu-feed/>

    Where triggerblogID is the number of the blog you've set in site-feed options. If 1 doesn't work, you'll need to set another blog as your site-feed blog.

    (devnews is the first feed, planetnews is the little boxes.)

  3. corourke
    Member
    Posted 17 years ago #

    How would I go about having the blog title show up instead of the bottom occurrence of the title when using wpmufeed to display the "planet" of posts around my site? Currently I'm seeing the title twice.
    Optimally I'd like to have it just show user name under the post title.

About this Topic