I'm trying to reset the font size for tag cloud by using the widget_tag_cloud_args
filter as follows:
add_filter( 'widget_tag_cloud_args', 'filter_tag_cloud_widget' );
function filter_tag_cloud_widget() {
$args = array(
'smallest' => 16,
'largest' => 16,
'unit' => 'px'
);
return $args;
}
This should set the font size for all the tags to 16px. The code does its job, but now there is an issue. The <div class="tagcloud"> ... </div>
wrapper for tag cloud is gone. The anchors are directly output in the sidebar like this:
<a href="/tag-path/" class="tag-cloud-link tag-link-32 tag-link-position-2" style="font-size: 16px;" aria-label="tag">tag</a>
What am I doing wrong?