I would like to customize the default tag cloud so that a tag doesn’t show in the cloud if it’s not popular (i.e. used at least in a given number of posts). This way, I won’t show tags less used than x times.
Another question is, where can I change the font size for this tag cloud ?
Any suggestion of a new plugin for tag cloud that allows these hacks isg reatly appreciated.
To change the font sizes, edit wp-includes/widgets.php using information found at:
basically, you want this:
substituting the sizes you want.
Did you find out how to limit the cloud (your 1st question)?
I am also interested in limiting the tag cloud display to something like show only those tags used in < x posts.
Actually wp_tag_cloud is found in: wp-includes/category-template.php. You can change the font-size just like dtwilliamson noted above.
@Nanarolf_fr – You may be able to do what you’re trying to in wp-includes/category-template.php, however I just minimized the number of tags in my tag cloud. You’ll find that on the same line as the line you need to edit to change the font size. I just wrote this blog post about it.
what do you type in the widget box to limit the number of tags?
and some other strings but nothing works
<?php wp_tag_cloud('smallest=8&largest=14&number=12&'); ?>
I don’t use widgets but add code to sidebar.php for versatility so it may not help but full code to add tags is:
<li> <h2>Tags</h2> <ul> <?php wp_tag_cloud('smallest=8&largest=14&number=12&'); ?> </ul> </li>
small text size 8
number of tags 12
- The topic ‘Limit tags in tag cloud’ is closed to new replies.