wordpress font size tag cloud

The default font size for wordpress tag cloud is not well formated for all wordpress theme.So how to change wordpress theme tag cloud fontsize.There is a filter for wordpress called “widget_tag_cloud_args” In this filter you can apply font-size and many more options for wordpress tag cloud.

 

What you have to do is add given code into your current theme’s functions.php  file.

Code


function filter_tags_options($args = array()) {

$args['smallest'] = 8;

$args['largest'] = 12;

$args['unit'] = 'pt'; return $args;

}

add_filter('widget_tag_cloud_args', 'filter_tags_options');

You can change following options into tag options


'smallest' => 8,

'largest' => 22,

'unit' => 'pt',

'number' => 45,

'format' => 'flat',

'separator' => \"\n\",

'orderby' => 'name',

'order' => 'ASC',

'exclude' => null,

'include' => null,

'topic_count_text_callback' => default_topic_count_text,

'link' => 'view',

'taxonomy' => 'post_tag',

'echo' => true

Leave a Reply

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