WordPress Admin Panel News Hack

I’ve recently discovered “Lorelle’s”:http://lorelle.wordpress.com/ blog on all things WordPress and decided that I wanted to follow her entries on a more regular basis. However, I have been reluctant to add her feed to any of the categories currently in my Thunderbird reader, since her site topics don’t really easily fit into any one of those categories. And I don’t like creating new feed categories until I already have several that fit the category.

It occurred to me this morning, though, that the perfect place to keep tabs on her feed is to add it to my WordPress administration panel, right alongside the other WordPress news feeds that are already piped into there by default. The process of adding her feed was actually a pretty simple matter of copy-paste-modify. Here’s what I did, for anyone interested in doing something similar with their WordPress:

The file I modified was the index.php file in the wp-admin directory. I scrolled all the way to the bottom of the file, looking for the code containing the RSS feeds. There’s actually two blogs of code here, one for the WordPress development blog and one for the Planet WordPress aggregator. The one _I_ was interested in was the Planet WordPress feed, since I already knew that as Lorelle’s site updates I’ll be checking out new articles regardless of what a summary or excerpt might say.

So I copied the block of code for Planet WordPress’s feed:

bq. items) && 0 != count($rss->items) ) {
?>

»

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

  • '>

and pasted it above the Planet WordPress block for easy scanning through both feeds. A couple of things needed modifying in order to get Lorelle’s feed to show up the way I wanted to. I had to first replace

bq. items) && 0 != count($rss->items) ) {
?>

with

bq. items) && 0 != count($rss->items) ) {
?>

to get it to fetch Lorelle’s feed. Then I had to replace

bq.

»

with

bq.

»

for a quick link to her site so that I could read past entries if I wanted to. The last change was to replace

bq. items = array_slice($rss->items, 0, 20);
foreach ($rss->items as $item ) {
?>

with

bq. items = array_slice($rss->items, 0, 5);
foreach ($rss->items as $item ) {
?>

since I don’t need 20 articles to appear. The five most recent entries are just fine with me. That’s basically the whole process and what I ended up with is this:

Lorelle feed in admin panel

Pretty shnazzy, eh?

Update: One final note of interest that Lorelle “reminded”:http://lorelle.wordpress.com/2006/06/30/feeding-on-lorelle-on-wordpress/ reminded me of – this hack is vulnerable to WordPress upgrades. Essentially, each time you update your software with the latest version, this hack will ‘magically’ disappear. So, in Lorelle’s words (if she doesn’t mind my quoting her):

bq. Make sure you make a copy of the template file, and that you save the instructions on how you did it (copy and paste the text from the article into a text file is one way) in the same directory clearly labeled so you can either restore or add back this hack to your WordPress Dashboard template file.

Thank you. That is all.

4 thoughts on “WordPress Admin Panel News Hack”

  1. Well, you know. Some people are funny about quotes. And I’ve only just ‘met’ you.

    And, heh, not a problem. It seemed like I’d run across a similar tutorial somewhere once upon a time, but since I hadn’t had the proper motivation to use it at the time, it slipped off into the ether and I couldn’t find it again. Your blog is exceedingly relevant to making better use of WordPress as a tool, so it only made sense to add your feed to the dashboard. Plus it let me get my inner geek on for a little while again. Looking forward to seeing what other goodies splash across my dashboard from your place.

  2. I followed the road…Goodness, me oh my! I know nothing about computers. I feel like I’m lost. And Lorelle helps me feel a little more at home. Except when I’m envious of her skills, ability, know how, chutzpah, go***s, and everything else! What a gal! I’ll try to keep up. Yeah, sure…

Have anything to add to the conversation?