No Widget Category Cloud Wordpress Plugin
Plugins, WordpressI am releasing version 0.2 of the No Widget Category Cloud Wordpress plugin that I have written for use on my site.
Creates a function that can be placed in a wordpress template for a category cloud that exists without the requirement of widgets or a widget ready theme.
I created this plugin after I started using a single column theme that is not widget ready. I found that there were multiple plugin widgets available, but no plugin that would allow me to just place a php function into my theme to display a category cloud.
Some ideas for oter uses of this plugin:
1. Install WP-Sticky and Exec-PHP. Create a Sticky post which will stay at
the top of your page and type the php code for this plugin in the post. Now
you have a Category Cloud that stays at the top of your page.
Screenshots

Installation
1. Upload the `no-widget-category-cloud` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the ‘Plugins’ menu in WordPress
NOTE: See “Other Notes” for Upgrade and Usage Instructions as well as other pertinent topics.
Requirements
1. Wordpress 2.x
2. Web server that supports PHP
Upgrade
1. Deactivate the plugin through the ‘Plugins’ menu in WordPress
2. Delete the previous `no-widget-category-cloud` folder from the `/wp-content/plugins/` directory
3. Upload the new `no-widget-category-cloud` folder to the `/wp-content/plugins/` directory
4. Activate the plugin through the ‘Plugins’ menu in WordPress
Usage
<?php nw_catcloud(small_size,big_size,size_unit,align,orderby,order,min_posts,hide_empty,title); ?>
small_size = font size, integer (default 75)
big_size = font size, integer (default 200)
size_unit = %, px, pt (default %)
align = left, right, center, justify (default left)
orderby = count, name (default name)
order = asc, desc (default asc)
min_posts = minimum number of posts, integer (default 1)
hide_empty = 0,1 (default 1, 1=yes,0=no)
title = string (This can contain HTML to format the title)
1. Open the theme files, in your favorite editor, that you wish to add the category cloud to (index.php, single.php, page.php, etc…).
2. Add a line that looks like above. You can also use the defaults by not specifiying anything between the parentheses. See example 2 below.
3. Enjoy.
4. As I mentioned in the description you can also use this plugin with Exec-PHP and it would make a nice combo with WP-Sticky.
Examples:
<?php nw_catcloud(75,200,'%','left','name','asc',1,1,'<h2 class="posttitle">Categories</h2>'); ?>
<?php nw_catcloud(); ?>
Change Log
0.2
- Initial Public Release
To Do
1. I am open to suggestions.
2. I am sure I will think of something.
Credit
I’ve got to give credit where credit is due. And that credit goes to Lee Kelleher and his Category Cloud Widget. I used a lot of his code in this plugin modifying it where needed to make it work the way I wanted.
Download
No Widget Category Cloud version 0.2
Comments
Pingbacks
- Eternal Love » Blog Archive » Upgrade Completo! _o// Pingback on Thursday 1st November
- SEO Skills » Blog Archive » Building a SEO Friendly Blog Pingback on Sunday 4th November

Hi,
I rated your plugin on it’s Wordpress Plugin page. Thanks for the plugin!
One suggestion I have is to mod this plugin to also create a ‘no widget TAG cloud’. Since I use categories more for organization rather than descriptive purposes, I would love to see a tag cloud plugin that doesn’t require a widgetized sidebar.
Thanks!
As I don’t use tags I doubt I would be able to get around to this any time soon. You may want to look at http://wordpress.org/extend/plugins/new-tag-cloud/ as it offers instructions as to using it in your theme instead of using it as a widget.
i really love this! thanks so much for making it :)
Matt, I have modified your plugin to include tags in the cloud too. You can see it in action at http://rvbhute.org/tag-cloud/
I have used the $wpdb object. The code is clean. If you want, I can send you the modified plugin to see if it can be incorporated into your main release.
nice work! i was looking for this, a category cloud plugin for wp 2.3+.
my only problem has been the sizes, even if it set the smallest to be 10 and the biggest to be 18 (in px) i get the smaller as 13 and the biggest as 21. any idea on how to get it working under the right parameters?
It has to do with the way that the “font steps” are calculated. It uses the smallest and biggest for beginning points and then does some calculations to determine what step between them to use based on the number of posts in that category. These calculations are found between lines 66 to 92 of no-widget-category-cloud.php. So basically the way that the calculations are done never allows the text to actually equal the smallest or largest value specified.
I may in a future release find a way to change this behavior.
Matt,
Thanks for your reply. But i managed to fix it by copying the wp_tag_cloud function to wp_cat_cloud, and changing its behavior to pick categories instead of tags and worked fine. It´s pretty similar to yours.
Matt, I´m trying to figure out how do I exclude some categorie from the cloud.
I saw at your plugin something about $exclude, but I do not understood how to make it work.
“function nw_catcloud($small=75,$big=200,$unit=’%',$align=’left’,$orderby=’name’,$order=’ASC’,$min=1,$hide_empty=1,$title=”,$exclude=”) ”
i´m trying this:
get_var(”SELECT term_ID FROM $wpdb->terms WHERE name=’Asides’”); ?>
get_var(”SELECT term_ID FROM $wpdb->terms WHERE name=’Featured’”); ?>
If you could help me, I would be glad. Thanks and congrats for great plugin.
Murillo
Sorry U forgot to put how I´m trying to exclude. Here it is:
@Murillo: Exclusion was never completed in this plugin. As I wrote this plugin for use on my site specifically and it works as I need I will more than likely not continue developing this plugin until I require a change for my site.
In the event that I for some reason in the near future decide to start developing this plugin again it will probably go through a complete rewrite.
Hi!
Good plugin! Thanks you!
Thanks, this is exactly what I needed! :)
Is there a way to include tags in the tag cloud. I onnly get the categories.
@Asuka_Aki: There is no way to include tags. Per the name of this plugin it is for categories only.
Hi - Thanks a lot for a nice little plugin! A nice, compact way to give access to other categories (in my case, Italian regions in an Italy guide).
On my wish list, too, is the possibility to exclude certain categories from being displayed.
Ideally you might make it a widget with both this and the possibility to add in as many widgets as one likes. Then (eventually using it with the Widget Logic plugin) one could decide in which categories this widget sas to be displayed.
Anyhow - thanks a lot. It did the trick.
Kjetil
- http://www.dolcevita.no