« Wordpress 2.0 | Home | Ad Nauseam »

Get More Mileage from your Wordpress Dashboard
Posted on 12/27/05 @ 12:22 pm

The current Wordpress Dashboard is boring. Like I said in my last post, aside from the relevant information like your latest Technorati mentions and comments, the built-in feeds from Planet Wordpress and the Wordpress Development Blog are dated and often times not very relevant to the average Wordpress blogger. So what do most people do? They skip it. Lately, I've only gone to check the Dashboard if I wanted to know who's mentioning me in their blog. Other than that, I rarely go there. I'll show you how to get more out of your Wordpress Dashboard so you can turn it into a portal for your favorite feeds. Sure, you could install a plugin to do these similar functions, but if you're like me, you like to get your hands dirty. Up for a little code-diving? Fire up your FTP client or navigate to the wp-admin/index.php file and let's go! Don't forget to backup!

  1. "Welcome to Wordpress" -- nice, but let's change it to something better. Scroll down until you reach this line:

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

    Just change the text inside the php _e function to whatever you'd like. Let's keep going.

  2. Now in the next section of code, you can keep these admin links, or change them to say...you favorite news sites? Think about how you want your Wordpress Dashboard to function.

    <p><?php _e('Use these links to get started:'); ?></p>

    <ul>
    <li><a href="post.php"><?php _e('Write a post'); ?></a></li>
    <li><a href="profile.php"><?php _e('Update your profile or change your password'); ?></a></li>
    <li><a href="link-add.php"><?php _e('Add a link to your blogroll'); ?></a></li>
    <li><a href="themes.php"><?php _e('Change your site's look or theme'); ?></a></li>
    </ul>

    I decided to keep these links, but I did take out the "Update your profile or change your password" line because I don't see a need to do that at any time. And if I did, it's right there in the admin menu anyway.

  3. Now we're getting to the meat and potatoes of this tutorial -- customization. This is the section you're looking for, which comes right after the section listed above:

    <p><?php _e("Below is the latest news from the official WordPress development blog, click on a title to read the full entry. If you need help with WordPress please see our <a href='http://codex.wordpress.org/'>great documentation</a> or if that doesn't help visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p>
    <?php
    $rss = @fetch_rss('http://wordpress.org/development/feed/');
    if ( isset($rss->items) && 0 != count($rss->items) ) {
    ?>
    <h3><?php _e('WordPress Development Blog'); ?></h3>
    <?php
    $rss->items = array_slice($rss->items, 0, 3);
    foreach ($rss->items as $item ) {
    ?>

    Let's take this piece by piece. Again, think of how you want your Wordpress Dashboard to function. Do you want it to be a low-level aggregator of your favorite feeds? Or maybe an alternate E-mail-to-RSS type catch-all (think Gmail)? First, let's change the description:

    <p><?php _e("Below is the latest news from the official WordPress development blog, click on a title to read the full entry. If you need help with WordPress please see our <a href='http://codex.wordpress.org/'>great documentation</a> or if that doesn't help visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p>

    Like before, just change what's in the php _e function to your liking. Pay special attention to how the links are formatted so you don't break your Dashboard (and if you do, we've still got our backup). On my Dashboard, I have my Odeo feed of podcasts I like to listen to frequently. Now, let's add the RSS feed of the section you just described (it does have an RSS feed...right?). You're looking for this from the code section listed above:

    <?php
    $rss = @fetch_rss('http://wordpress.org/development/feed/');
    if ( isset($rss->items) && 0 != count($rss->items) ) {
    ?>

    Just change the feed from the $rss declaration and you're golden. Keep going to this section:

    <h3><?php _e('WordPress Development Blog'); ?></h3>

    I think we're getting the hang of this now. Change the text in the php _e function to the name of your new section. Now, how many entries do you want this to populate? By default, there are three entries. Let's say you want five.

    <?php
    $rss->items = array_slice($rss->items, 0, 3);
    foreach ($rss->items as $item ) {
    ?>

    Just change the 3 in the loop above to 5 or however many entries you'd like it to be. But wait...we're not finished yet!

  4. Now about that whole low-level aggregator business I've been throwing around. From the first example, you'd think "Hey, I can only add one feed at a time -- that sucks! I'll have to keep copy and pasting and editing code to put all the feeds I want on here!" Not the case, kemosabe. On my Dashboard, I have some of my favorite feeds put together into one RSS feed, and you've got several options to do this. I use FeedJumbler, but you could also use services like Feedshake, Aggrssive, BlogSieve, FEEDcombine, KickRSS, or RSSMix. The choice is yours. Some of these services do have a limit of how many feeds you combine, so be mindful of that.

    Now once you've got your new feed created, we're going to place it in the following section right below the code we just edited:

    <?php
    $rss = @fetch_rss('http://planet.wordpress.org/feed/');
    if ( isset($rss->items) && 0 != count($rss->items) ) {
    ?>

    Just like before, replace the feed you created where the Wordpress feed is in the $rss declaration.

  5. Next is the following div tag:

    <div id="planetnews">

    Chances are, you don't like those grey boxes Wordpress has set up. And why are there so many of them? Don't worry -- we'll get to changing that. Note: if you want your incoming entries for the feed you just created to be a normal bulleted list, remove this div. Don't forget to delete the closing div tag also. But if you're a crafty bugger, you can edit it yourself. The CSS for the Wordpress Admin Panel is in your wp-admin directory and is called wp-admin.css. You're looking for the following lines:

    #planetnews ul {
    list-style: none;
    margin: 0;
    padding: 0;
    }

    #planetnews li {
    width: 17%;
    margin: 1%;
    float: left;
    }

    #planetnews li a {
    display: block;
    padding: .5em;
    background: #ddd;
    height: 6em;
    overflow: hidden;
    }

    I'd show you how to edit this...but that's another tutorial.

  6. Anyway, now we're going to edit the title of this new section. Maybe "Karsh's Fabulous Conglomeration of RSS-ery." Or not.

    <h3><?php _e('Other WordPress News'); ?> <a href="http://planet.wordpress.org/"><?php _e('more'); ?> »</a></h3>

    Change what's in the first php _e declaration to the title of your choice, and change the link to...well...whatever you like. Maybe to Bloglines?

  7. Now let's change the number of entries which populate from our new feed:

    <ul>
    <?php
    $rss->items = array_slice($rss->items, 0, 20);
    foreach ($rss->items as $item ) {
    ?>

    Like earlier, just change the large number in the loop (in this case 20) to the number of entries you'd like to see.

  8. Save and refresh your Wordpress Admin Console and go to the Dashboard. Success! Enjoy your new-fangled, self-styled dashboard. As always, your mileage my vary.

Filed under: Technology
Comments: Comments Off

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

No Comments

No comments yet.


RSS feed for comments on this post. |

Sorry, the comment form is closed at this time. Send me an e-mail if you wish to comment on this closed entry.


It's me!Name's Karsh. 28. Country-born, city-raised, college educated. Writer. Artist. Musician. Mathematician. E-Media hotshot. Blasphemous Hater. Need a website? Hit me up.

PayPal | Amazon Wishlist

Search
 

Main Menu
About
Advertise
Contact
Random Post

Alltop, confirmation that I kick ass
Text Link Ads

Archives


Syndication
RSS 2.0
Atom 0.3
Blogcast RSS Feed


Credits and Copyright
Proudly powered by WordPress. All content © 2003-2010 Karsh.
Theme based from Bionic Jive from Theron Parlin.