Your WordPress website probably just started growing and it has a lot of tags. Some website designs might start looking out of sync with that big, messy list inside the WordPress tag cloud widget. If you would rather still show a number of tags instead of removing them, here’s how:
//Adds a filter callback add_filter('widget_tag_cloud_args', 'tag_widget_limit'); //This will limit the number of tags function tag_widget_limit($args){ //Checks if taxonomy option inside widget is set to tags if(isset($args['taxonomy']) && $args['taxonomy'] == 'post_tag'){ $args['number'] = 20; //The number of tags displayed now } return $args; }
Just go inside your theme’s folder and paste the code at the end of your functions.php file.