Modifying the WordPress Tag Cloud Widget 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
Find:

wp_tag_cloud(); // at around line 1372

Change to:

wp_tag_cloud('smallest=10&largest=14&number=25&orderby=name');

“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

Share this:

Email
Facebook
Twitter
Pinterest
Pocket

Premium Themes for WordPress

Looking for an easy-to-use Premium Theme for WordPress? Check out Themes by bavotasan.com and have your site up and running in no time.

Use this WordPress website builder to build powerful websites in no time for your or your clients.

WordPress Hosting

WP Engine – designed from the ground-up to support and enhance the workflow of web designers.

Bluehost – providing quality web hosting solutions since 1996.

About the author

Picture of Luke Perrie

Luke Perrie