Limit tags in tag cloud (7 posts)

  1. Nairolf_fr
    Posted 7 years ago #

    "Hello World",

    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.

    Thanks !

  2. dtwilliamson
    Posted 7 years ago #

    To change the font sizes, edit wp-includes/widgets.php using information found at:


    basically, you want this:


    substituting the sizes you want.

  3. Saurus
    Posted 7 years ago #

    And stop making 3 posts on the same issue.

  4. jdybka
    Posted 7 years ago #

    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.

  5. Wes
    Posted 6 years ago #

    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.

  6. gsawiris
    Posted 6 years ago #

    what do you type in the widget box to limit the number of tags?
    i tried


    and some other strings but nothing works

  7. bonx
    Posted 6 years ago #


    <?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:

    <?php wp_tag_cloud('smallest=8&largest=14&number=12&'); ?>

    small text size 8
    largest 14
    number of tags 12

Topic Closed

This topic has been closed to new replies.

About this Topic