Readable Tag Cloud Sizes
Keeps the smallest tags in tag cloud widgets and blocks large enough to read and tap, and sizes them in relative units so they grow with the visitor's text size.
Opens WPIDE on
Code
add_filter( 'widget_tag_cloud_args', function ( $args ) {
$args['smallest'] = 0.9;
$args['largest'] = 1.5;
$args['unit'] = 'em';
return $args;
} );
Notes
Change the smallest and largest values (in em) to fit your design.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.