Tag cloud font size
-
Hello,
I’m trying to change the font size of the tag cloud elements using the following filter hook:
function set_tag_cloud_sizes($args) { $args = array( 'smallest'=> 14, 'largest' => 14, 'unit' => 'px', ); return $args; } add_filter('widget_tag_cloud_args','set_tag_cloud_sizes');
This code gives me the right font size, however the title of the tag cloud widget disappears.
On the other hand, if I use this syntax for defining an array instead of the previous, the title remains:
function set_tag_cloud_sizes($args) { $args['smallest'] = 14; $args['largest'] = 14; $args['unit'] = px; return $args; } add_filter('widget_tag_cloud_args','set_tag_cloud_sizes');
Why do these two different ways of defining arrays give me two different results??
- The topic ‘Tag cloud font size’ is closed to new replies.