Math Jazz — Mathias Bynens’s shizzle, y’all



Note: This site might seem inactive… That’s because it is. Don’t worry though, I’m still coding webpages and stuff! If you’re interested, I suggest you get a translator and head over to Qiwi; or you could just check the latest site we’ve been working on: Apotheek Goethals – Debrabandere. Enjoy!

Using WordPress as a blogroll manager

After blo.gs started to temporarily disable their search feature, I got pissed. It’s been months since the last time I was able to add a site to my own feckin’ blogroll. That’s right, I was using a WP plugin to fetch my links from the rather slow blo.gs server every hour or so and cache the list locally.

You might be interested in knowing that, as of version 1.5, WordPress comes with a built-in link updater, which you can use periodically to check the latest updated time of the links in your blogroll. Every time /wp-admin/update-links.php is run, WP queries Ping-o-Matic, which returns a list of links and update times. Your links database, which happens to include a link_updated field, can then be updated.

Sounds great eh? It is great. The only problem is that obviously it’s impossible to visit the link updater every time you want your blogroll to be updated.

Here, you have two possible options; you can set up a cron job, or you can use some plugins to fake a cron job ;) The latter is the only method that works on every WordPress installation (this of course depends on server setup), so here goes.

  1. Go to the Link Manager in your WP admin section (/wp-admin/link-manager.php), and enter the links for your blogroll in a new category, for which you set the sort order to updated. If you’ve already got an account over at an online service such as blo.gs or blogrolling.com, you can quickly import your ’roll using the OPML file containing the link data using the Blogroll Importer (located at /wp-admin/link-import.php). Obviously, this is much faster than manually entering the links one by one.
  2. Install and activate the WP-Cron plugin if you haven’t already.
  3. Go to Miscellaneous Options (/wp-admin/options-misc.php) and make sure the Track Links’ Update Times checkbox is ticked on.
  4. Install and activate the WP-Cron Update Links plugin.

This will cause your blogroll to be updated every fifteen minutes (and one second). The great advantage of using WP’s own link manager over a fancy feed-fetchin’ plugin is that you now have full control over how your links are displayed. Say goodbye to blogroll spam!

Filed under PHP, XHTML, HTTP, WordPress · October 7th, 2005

Comments (11)

Listed below are the responses for this entry.

  1. Joen:
    This commenter’s Gravatar

    Thanks for writing your article, I’m trying it right now. If it works, I’ll migrate.

    Comment posted on October 11th, 2005 @ 3:37 pm
  2. AAwoken:
    This commenter’s Gravatar

    I am running WP 2.0 RC1 and I get feature disabled when I run /wp-admin/update-links.php. I do have WP-Cron 1.4 and the Update-Links plugin installed. I am using the Falling Leaves theme and would really love to have the links sorted by the most recently updated. Any help?

    Comment posted on December 14th, 2005 @ 12:26 am
  3. Brittanie:
    This commenter’s Gravatar

    I am having the same issue as the above commenter, with WP 2.0 stable. Please help!

    Comment posted on January 11th, 2006 @ 2:20 am
  4. Mathias:
    This commenter’s Gravatar

    Go to /wp-admin/options-misc.php and make sure the Track Links’ Update Times checkbox is ticked on.

    Comment posted on January 11th, 2006 @ 1:58 pm
  5. AAwoken:
    This commenter’s Gravatar

    The abovementioned tick box is checked.

    Comment posted on January 11th, 2006 @ 2:40 pm
  6. Brittanie:
    This commenter’s Gravatar

    Sorry, but it’s still not working for me either. I’d really like to use this plug-in but can’t figure it out. Your help would be greatly appreciated.

    Comment posted on January 13th, 2006 @ 1:11 am
  7. Mathias:
    This commenter’s Gravatar

    Then just call the get_links() function, but make sure the the order parameter is set to updated, e.g. <?php get_links('-1', '<li>', '</li>', "\n", 0, 'updated'); ?>. Then place that call in your template wherever it is you want your blogroll to appear. This should work…

    Comment posted on January 13th, 2006 @ 5:49 pm
  8. angie:
    This commenter’s Gravatar

    Thanks! Just installed it. Everything looks okay so far.

    Comment posted on May 3rd, 2006 @ 4:14 am
  9. Kishmish:
    This commenter’s Gravatar

    hi
    I was wondering if you could tell me what is needed to alter a post status from draft to publish manually. I am trying to make a list of my posts (some 150 drafts) and showing the posts status in one column. if I click on the “draft” i do the following changes to wp_posts table in database:

    - update post_date cell in wp_ post to “now” with this function :$date1 = date(”Y-m-d : H:i:s”);

    - update post_status cell in wp_ post from “draft” to “publish”

    but the post does not apear in the blog. what else is needed? is is my blog timing that makes the problem? do I need to alter more things?

    please help?

    .

    Comment posted on July 19th, 2006 @ 8:40 pm
  10. Chris:
    This commenter’s Gravatar

    I wonder — does this work if you’re using widgets to place your links, rather than manually placing the get_links into the sidebar? I’m using WP2 with widgets, and nothing happens when I manually refresh the update-links.php file.

    Comment posted on August 28th, 2006 @ 9:43 am
  11. John Baker:
    This commenter’s Gravatar

    I don’t think this wp-cron-update-links section works. wp-cron itself is fine, but this part doesn’t work on my blog and after spending hours looking for just one other site that has it working, I’ve come up with nothing.
    Does anyone know of a plugin that lists links in an ‘updated’ order?

    I wonder — does this work if you’re using widgets to place your links, rather than manually placing the get_links into the sidebar? I’m using WP2 with widgets, and nothing happens when I manually refresh the update-links.php file.

    Comment posted on January 21st, 2007 @ 9:00 pm

Trackbacks & Pingbacks (2)

Listed below are resources on the web that mention this article.

  1. skippy dot net: WP-Cron 1.4:
    This commenter’s Gravatar

    WP-Cron 1.4
    WP-Cron 1.4 is now available for download! […]

    Pingback made on October 9th, 2005 @ 1:36 pm
  2. noscope: Blogroll Spam!:
    This commenter’s Gravatar

    Blogroll Spam!
    Migrated to using the internal WordPress link manager. This solved all my problems. About time too, it seems some existing blogroll sites are starting to change URLs, not names!

    Trackback made on October 11th, 2005 @ 10:31 am