WordPress: How to add a To-do List

I have searched the net for a WordPress plug-in that would allow me to add a todo list to a WordPress blog, but to no avail. My options were to write my own or keep searching. What I really wanted was a to-do list like the available for Google personalized homepages. This ultimately led me to see if that wonderful little Ajax list machine could be plugged into a website, and low and behold…Google gadgets!

To-do Lists and Google Gadgets

Good news!!! There are several to-do list gadgets available. I tried a few of them, and have settled on using Remember The Milk’s great little list maker. I wanted it to show up in my sidebar, so its width would need to be resizeable. Remember the Milk’s is a little fancier than the Google todo on my Google homepage, more fancy than I really wanted, but I had trouble getting Google’s to work in my Blog.

Here’s how to pick a Google gadget todo list and plug it into your sidebar:

  1. Go to Google gadgets and run a search…I searched for “list”
  2. Find the one you like
    • I really like the one called “To-Do List” by Sophia B, you have to click on the gadget name to see a preview and who the author was. Trouble was, when I plugged it into my sidebar, I got this error: Sorry! Cannot render inline-required gadgets in an iframe.
    • Got that same error a couple of times, but Remember The Milk’s worked without a hitch. You have to set up an account with them…it’s free.
  3. Click the “Add to your webpage” button
  4. Configure the Gadget to your liking…remember size is a constraint in many sidebar’s if that’s your destination for it
  5. Click the “Get the code” button and copy the code in the box that appears
  6. Go to your WordPress blog admin page – Presentation – Theme Editor
  7. Select your Sidebar file (or wherever you want to put it)
  8. Find the place in the code you want it to appear and paste it in. You might need to nest the code in tags like: <li>…</li> or <div>….</div>, depending upon whether you’re adding it to a ul or ol list or you want to set it off.

If you only want the To-Do list to show up if someone with Admin rights is signed in, you’ll need to enclose the Gadget code in some PHP. This is what I used (I only want me to see my To-do list):

<?php
global $user_login;
get_currentuserinfo();
if ($user_login && current_user_can('manage_options')){
?>
.......insert gadget code here.....
<?php } ?>

If the get_currentuserinfo() function has already been called in your script, you can omit calling it again. This code checks to see if the logged in user the rights to “Manage Options” in your WordPress blog. If so, the user has Admin priviledges.

There it is…a quick and easy way to add a To-Do List to your blog! Google’s got gadgets…I plan to check out more.

PS…if anyone know how to get rid of that error I mentioned up in step 2 so you can run the Google list, I’d love to know!

Update

I came across another post that covers the addition of Google Gadgets in general. Lorelle gives a very nice, succinct description in her post here.

One Response to WordPress: How to add a To-do List

  1. Elisa August 17, 2010 at 4:41 pm #

    Thanks for this! I want to put a to do list on my blog for personal goals, as a motivation for myself. But I can’t seem to set Remember The Milk to display all tasks, not only today’s..

Powered by WordPress. Designed by Woo Themes