I’ve written a simple plugin that removes the html line breaks (br) between tags when the command wp_tag_cloud() is called from within a post. This is useful for people running a hack like runPHP to be able to execute commands since this behavior doesn’t manifest itself if you run the command from within a template.

To use this plugin, download one of these files and copy it to your /wp-content/plugins/ directory:

Tag Cloud Inline Plugin (.txt)
Tag Cloud Inline Plugin (.tar.gz)

If you grabbed the one ending in .txt, rename it to end it .php and simply activate the plugin from the Admin->Plugins page. The dreaded line breaks will dissapear. You can view this plugin in use on this tag cloud from neatostuff.com

This Post Has 6 Comments

  1. For some reason, this plugin stopped working with the latest release of WordPress (2.3.2). It works with 2.3.1 and earlier and I haven’t been able to track down why it stops working with the latest release.

    For one of my sites (neatostuff.com), I changed to using a very capable plugin called SimpleTags which allows for very nice tag formatting and lot of other features.

    I’ll post here if I can figure out why it’s broken in the latest release.

  2. Thanks. I’m using still 2.3.1 for WP also. I’ll check simpletags.

  3. Great plugin. If only it worked for current WP versions. I’ve been trying to avoid having to debug this one. We use a tag cloud in the body of our posts using Exec-PHP. Any luck in fixing this plugin to work with current WP versions? I am using 2.8.1.

    BTW. If your into wordpress tags you might like to check out a flash based tag cloud plugin I have launched that produces beautiful ‘wordle-like’ tags clouds : http://netlife.com.au/2009/06/28/wordle-your-wordpress-flash-based-tag-cloud-plugin/

  4. For anyone still needing help; you don’t need any plugin to strip the br that gets added simply specify the separator argument in wp_tag_cloud to ”. By default it uses a newline symbol, which gets converted by WordPress to a br code.

Comments are closed.

Close Menu