Customize the WPMu Dashboard

Here’s a simple hack to make your WordPress Multi-User Dashboard display news and recent posts from within your specific WPMu community. For example, I am going to briefly illustrate how to display the “Latest News” for our community (traditionally where the WordPress development news appears) as well as the 20 most recent posts from around UMW Blogs (traditionally where posts from Planet WordPress are displayed).

Below is a screen shot of what it looks like (click on the image to see a larger version to get a fuller sense of how this looks).

UMW Blogs Dashboard

The idea was sparked by Gardner Campbell during the UMW Blogs forum we had a couple of weeks ago, and I think it is an awesome way to connect each individual with the larger UMW Blogs community right where they live—their blog dashboard.

It is a really simple hack that only requires changing a few lines of code in both the index.php and index-extra.php files within the wp-admin folder.

Here’s how:

First the index.php file found in the wp-admin folder:

Find the following line in this file:

<h2><?php _e('Welcome to WordPress'); ?></h2>

And change it to the title of your WPMu community. Ours looks like this:

<h2><?php _e('Welcome to UMW Blogs'); ?></h2>

Next, find the following line of code:

Image of Need help WP

And link it to your own documentation if you have some handy. Ours looks like this:

Image Need Help UMW Code

That’s it for the index.php file in wp-admin. Now, we need to modify a few lines on the index-extra.php file in the same directory and that’s all there is to it!

Find the following lines of code:

case 'devnews' :
$rss = @fetch_rss(apply_filters( 'dashboard_primary_feed', 'http://wordpress.org/development/feed/' ));
if ( isset($rss->items) && 0 != count($rss->items) ) {
?>
<h3><?php echo apply_filters( 'dashboard_primary_title', __('WordPress Development Blog') ); ?></h3>

And change the ‘devnews’ primary feed to a feed URL that will deliver news specific to your community. Then change the title from ‘WordPress Development Blog’ to something more appropriate. Ours looks like this:

case 'devnews' :
$rss = @fetch_rss(apply_filters( 'dashboard_primary_feed', 'http://umwblogs.org/feed/' ));
if ( isset($rss->items) && 0 != count($rss->items) ) {
?>
<h3><?php echo apply_filters( 'dashboard_primary_title', __('UMW Blogs News') ); ?></h3>

Next, do the same exact thing for the Planet News feed, just use the Sitewide Feed for WPMu or some other feed you might have that will feature a range of content from a number of blogs in the community.

case 'planetnews' :
$rss = @fetch_rss(apply_filters( 'dashboard_secondary_feed', 'http://planet.wordpress.org/feed/' ));
if ( isset($rss->items) && 0 != count($rss->items) ) {
?>
<h3><?php echo apply_filters( 'dashboard_secondary_title', __('Other WordPress News') ); ?></h3>

Ours looks like this:
case 'planetnews' :
$rss = @fetch_rss(apply_filters( 'dashboard_secondary_feed', 'http://umwblogs.org/wpmu-feed/' ));
if ( isset($rss->items) && 0 != count($rss->items) ) {
?>
<h3><?php echo apply_filters( 'dashboard_secondary_title', __('Posts from around UMW Blogs') ); ?></h3>
<ul>

Finally, find the following line of code (which is the “More” link after 20 most recent posts in the blog community):

Image of Read More Code Hack

And change the URL to something that will bring the readers to more recent post. In our case we have a page that list excerpts from the fifty most recent posts, and that would be where we would want to send folks who want to see more. Below is the UMW Blogs code:

Image of read more code hack 2

That’s it, now each and every user in your community has immediate access to a range of information and other people’s posts from right within their dashboard. Bring the content to them, don’t make them search too hard for it!

Related posts on bavatuesdays

About Reverend

I am Jim Groom
This entry was posted in feeds, Hack, hacks, rss, UMW Blogs, Uncategorized, Wordpress, wordpress multi-user, wpmu. Bookmark the permalink.

7 Responses to Customize the WPMu Dashboard

  1. Dr. C. says:

    Absolutely wonderful, Jim. I’m gobsmacked and thoroughly delighted. “Thanks” seems woefully inadequate.

    Amazing.

  2. Gardner says:

    Sorry about the “Dr. C.”–didn’t notice it until after I’d pressed go….

  3. Excellent thanks. Very helpful.

    In our case we wanted to supress the Dev blog from appearing to anyone below the role of Admin and show nothing at all.

    So a simple hack in wp-admin/index.php change

    to

    Not pretty, but effective and keeps authors from having to see security upgrade issues and the like.
    If you wanted to remove it al

  4. My html and php got yanked from my comment. (Seem quite prudent 😉

    so what I did was conditionally display the ‘devnews’ and ‘planetnews’ divs on index.php file if ‘current_user_can(‘manage_options’)’

  5. reverend says:

    Very cool, Ted. I would love to see that code, could you send it to me here: jimgroom_at_gmail.com

    Thanks for the comment.

  6. Jeremy says:

    It’s a shame you don’t have a donate button! I’d certainly donate to this
    excellent blog! I suppose for now i’ll settle for book-marking
    and adding your RSS feed to my Google account. I look forward to brand new updates
    and will share this website with my Facebook group.
    Talk soon!

  7. Sienna says:

    When I originally commented I appear to have clicked on the -Notify me when
    new comments are added- checkbox and now every time a comment is added I
    recieve four emails with the exact same comment. There has to be
    a way you can remove me from that service? Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *