Hello, I’d like my tag cloud widget to display tags in different sizes.
I’ve alredy modified my functions.php in the child theme
// Removes sf_tag_cloud_args from the flexform phase
function remove_add_filter() {
remove_action('widget_tag_cloud_args','sf_tag_cloud_args' );
}
// Call 'remove_add_filter' during WP initialization
add_action('init','remove_add_filter');
// Add our custom function to the 'flexform' phase
add_filter( 'widget_tag_cloud_args', 'child_tag_cloud_args' );
function child_tag_cloud_args( $args ) {
$args['largest'] = 31;
$args['smallest'] = 14;
$args['unit'] = 'px';
$args['format'] = 'list';
return $args;
}
The above function seems to work but the problem is that you also setted the size of the tags via css (in the style.css of the main theme folder)
.widget ul.wp-tag-cloud li > a {font-size:14px!important;}
My question is how I could “delete” the above mentioned font-size rule without touching the main theme file, in order to display tags with different sizes?
I tried this in my child theme css
.widget ul.wp-tag-cloud li > a {font-size:auto!important;}
But it doesn’t work.
Could you help me?
Thanx!