Limit Your WordPress Tag Cloud
September 5th, 2010 Category: WordPress
You might have been wondering how it’s possible to modify the number of tags in your WordPress tag cloud. Until now I could not find a way to change this within the wp-admin area, what a shame. I don’t know why this has still not been integrated into the admin area of WordPress.
I guess you have three choices to come around this issue.
1. Modify the WordPress core source code
I found this solution from seorankings.com. This solution is quick and dirty. It may happen that you will have to apply the hack again when you update your WordPress version.
To modify open the file wp-includes/category-template.php and find the function wp_tag_cloud(). Change the number assignment from 45 to what ever you need.
function wp_tag_cloud( $args = '' ) {
$defaults = array(
'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,2. Add the tag cloud function call to your template
Another option is to add the wp_tag_cloud() function call into your template. I’ve not tested it but it should work when you add the call into your sidepar.php:
wp_tag_cloud(‘smallest=8&largest=22&number=30′);
Now you can easily adjust the number of tags in your cloud. For this option it’s needed to remove the tag cloud from your widgets within the wp-admin I guess.
3. Use a Plugin
Optionally search for a configurable tag cloud plugin and use it.













Leave a Reply