Global Tag Cloud Plugin

NB This post is actually by Deanna Schneider – not James

The global tag cloud plugin is a widget and shortcode that allows users to display the tag cloud from any blog in the site on any other blog in the site. Why would you want to do this you ask? Well, we use this in conjunction with Donncha’s sitewide tags plugin to generate a sitewide tag cloud without touching any code.  And, because the widget allows you to pull from any blog, we’re not limited to having the sitewide tags plugin posting to the main blog.

In addition, you can use the shortcode to generate a customized tag cloud. While WPMU has a built-in shortcode for tag clouds, it takes no parameters. This  tag cloud can take the following parameters:

  1. smallest=[number]
  2. largest=[number]
  3. unit=[pt|px|em|%]
  4. number=[number]
  5. format=[flat|list]
  6. orderby=[name|count]
  7. order=[ASC|DESC|RAND]
  8. exclude=[csv of tags to exclude]
  9. include=[csv of tags to include]
  10. blogid = [numeric id of blog to highlight – defaults to current blog id]

Configuring the widget is simple. Just fill in the ID of the blog you wish to highlight, and fill in the rest of the relevant information.

The settings above result in a tag cloud that looks something like so:

If you’d like to use the widget to direct people to a larger tag cloud, fill in the slug for the tag cloud page. The “More” link will appear in your widget, linked to your tag cloud page.  On the tag cloud page, drop in the shortcode [cets_tag_cloud blogid=1], and watch the magic.

Download the code.

Comments (19)

  1. Wow, Deanna, this was fast, thank you.

    But unfortunately the plugin doesn’t work. I tried in the plugins and mu-plugins-folder. The tag-cloud is there but the links don’t go to mysite/tags/tag/whatever but to mysite/tags/blog/tag/whatever.

    This link then shows a “Not found”.

    Do you know any solution?


  2. Are you using a sub-domain install? I only recently got a test sub-domain environment set up, and I don’t think I’ve tested this one on a sub-domain install. I’ll mess with it and see if I can get it working on sub-domains. Might take a few days, though, with the holidays.

  3. I submitted a patch for the switch_to_blog and restore_current_blog functions for wpmu. They don’t currently deal with permalinks, so this patch (theoretically) fixes that. But, it needs testing and feedback from the powers that be. If it gets approved, it should fix the problem.

  4. I didn’t expect it would. I didn’t change anything that would solve your problem. It’s an issue with core not rendering links correctly when doing a switch to blog function call. I’m working on a change to core. But, it’ll be a while before it’s committed.

  5. hi deanna,
    same problem here, would be great to have this fixed as i really love the idea of putting a all tag cloud on my main page.
    i am also running a subfolder install.
    thanks a lot and btw i love you plugins for wpmu, keep up the good work.