• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WBXPress.NET

Website Developement Guide

  • apache2
  • nginx
  • mysql
  • php7
  • SSL
  • wordpress
  • genesis
  • caching
  • seo

Control the Text Size of Tags in WordPress

Updated on 19th December 2015 Leave a Comment

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

tagcloud

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

tagcloud-before

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:

tagcloud-after

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

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

Filed Under: wordpress Tagged With: theme-development

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar

Most Popular Posts

  • Remove/ Defer Render-blocking JavaScripts
  • Customizing Genesis eleven40-pro Theme
  • Free Genesis Child Theme by WBXPress
  • Host Multiple Sites with SSL in Ubuntu 18.04
  • 25 Ways to Boost Website Traffic that Really Work

Recent Comments

  • Ruhul on Customizing Genesis eleven40-pro Theme
  • Priya Agarwal on Customizing Genesis eleven40-pro Theme
  • mimi roy on Remove/ Defer Render-blocking JavaScripts
  • danish choudhary on Customizing Genesis eleven40-pro Theme
  • Radhe on Customizing Genesis eleven40-pro Theme

Copyright © 2021 · Powered by WordPress · Log in