Tag Archives: Significant Tags

New Plugin: Significant Tags

Full and reduced tag cloud, respectively.

I used to be annoyed with WordPress’ tag list/cloud functionality. Not only do you have to employ special means1 to get it to a regular post or page, but it also has limited functionality. In my sidebar, I use Most Popular Tags which is fine for what it does but does not allow treatment of less popular tags.

What I want is to filter out tags that occur only once or twice from my tagcloud because such tags are most likely of little interest but extremely blow up the list. So I sat down and wrote a plugin that allows me to do that, and more. Check out Significant Tags for the details and see it in action on my tag cloud page.

Click below to see how I did my tag cloud page.

Show »

It is not pretty, but it does the job:

<div id="tagcloud_more" style="text-align: center; width: 450px; line-height: 1.2;">
  [tagcloud drop_top=5 drop_bottom=3c]
<div id="tagcloud_all" style="display: none; text-align: center; width: 450px; line-height: 1.2;">
<a id="tagcloud_linka" style="text-decoration: none;" onclick="jQuery('#tagcloud_more').slideToggle('slow');jQuery('#tagcloud_all').slideToggle('slow'); jQuery('#tagcloud_linka').toggle(0); jQuery('#tagcloud_linkl').toggle(0);" href="#">Show all</a>
<a id="tagcloud_linkl" style="display: none; text-decoration: none;" onclick="jQuery('#tagcloud_all').slideToggle('slow'); jQuery('#tagcloud_more').slideToggle('slow'); jQuery('#tagcloud_linkl').toggle(0); jQuery('#tagcloud_linka').toggle(0);" href="#">Show less</a>

There is, of course, also the shortcode to set up:

$args = array("number" => 0, "separator" => "   ", "echo" => false, "drop_bottom" => "0", "drop_top" => "0");
$args = shortcode_atts($args, $atts);
return wp_tag_cloud($args);

  1. I use great Shortcode Exec PHP to call wp_tag_cloud as PHP is ignored in posts.