Jessie W
asked 8 years ago

I want to change the height, I tried to do it in css:

“`
.widget_tag_cloud {max-height: 250px;}
“`

It does change the height but just the container, so all it’s doing is cutting it off. I’d basically just like to change the amount of tags that show but I’m not sure how to do that.

5 Answers
DominicStaff
answered 8 years ago

Please let me know detail about it, you can send me your site for further checking or a screenshot to clearly for your request.

Jessie W
answered 8 years ago

So the tag cloud widget currently displays 50-60 tags and is about 600 pixels. But I only want it to display ~30 tags. Can’t find a way to do that in settings so my question is, is there a way to do that in CSS? I changed the height of the widget, but that doesn’t work because it just gets cut off. What I want to do is change the amount of tags that display.

Jessie W
answered 8 years ago
DominicStaff
answered 8 years ago

To resolve this issue, you can add the following code to the style.css file:

.tagcloud {
 overflow-y: scroll;
 height: 220px;
}
Jessie W
answered 8 years ago

This does shrink the box, but I want to limit the amount of tags shown, not just make a smaller scroll box. Is there a way to cut down the number of tags that show?

DominicStaff
answered 8 years ago

You can add the following code to the functions.php file:

add_filter('widget_tag_cloud_args','set_tag_cloud_numbers');

function set_tag_cloud_numbers($args) {

$args = array_merge( $args, array('number' => 10) );

return $args; }
Jessie W
answered 8 years ago

Perfect, thank you!!

Powered by DW Question & Answer Pro