I am attempting to style the widget tag cloud, however, it seems WordPress now adds style="font-size: 8pt;"
automatically to the tag cloud class. Does anybody know how to remove this? Seems like a poor coding decision...
1 Answer
wp_generate_tag_cloud
has a filter that allows you to edit the string input. You can use regex to find and remove the inline style:
add_filter('wp_generate_tag_cloud', 'na_tag_cloud',10,1);
function na_tag_cloud($string){
return preg_replace("/style='font-size:.+pt;'/", '', $string);
}