Modifying the WordPress Tag Cloud Widget Font Size

The active tags in the Tag Cloud of WordPress blog (self-hosted) has a font size that is so large (in my case, it is 22px) that it looks like a mistake. Is it possible to reduce its font size?

Using WordPress widgets for your sidebar really makes things easy on programmers and especially on users. The only problem I have come across is customizing the widgets so that they work exactly how you need and look the best for your specific design.

I needed to manipulate the Tag Cloud widget so that the size of the largest font was not too big. It only took going in and changing one line in the widgets.php files. I wouldn’t suggest doing this unless you are somewhat comfortable with messing around with your code.

File to manipulate: wp-includes/widgets.php

wp_tag_cloud(); // close to the bottom, around line 1990

Change to:

“smallest” is the size of the smallest font you want
“largest” is the size of the largest font you want
“number” is the amount of tags you want to appear
“orderby” is how the orders of the tags will be shown

Solution originally posted by Bavota San on October 27, 2008 at

%d bloggers like this: