Adjust Size of WordPress Tag Cloud

The default text size for WordPress tag clouds can be quite large. By default there are no options to change this. One option that I’ve seen recommended on forums is to hack core WordPress files to change this default behavior. However, these changes can be overwritten upon version update. A more permanent change is possible with the help of a plugin and some simple custom code:

  1. Install and activate the plugin PHP Code Widget
  2. Replace the old tag cloud widget with the new PHP code widget
  3. Insert this code into the new PHP code widget:
    <?php wp_tag_cloud('smallest=7&largest=13&number=15&orderby=name&format=flat'); ?>
  4. More options for customizing tag clouds are available from the WordPress Codex
  5. Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>