Control the Text Size of Tags in WordPress


In WordPress there is a useful widget called “Tag Cloud” to show case most used tags.


But we dont have any control in text size of the above widget. It looks like:


Now if you want to set a minimum text size or a maximum text size, you may add a code into theme function. After adding the code it will look like:


The necessary code which is to be added into functions.php:-

function set_number_tags($args) {
$args = array('smallest'    => 8, 'largest'    => 16);
return $args;

Leave a Reply

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