-
AuthorPosts
-
December 10, 2016 at 2:39 pm #722688
Is there a limitation set on how many tags were shown on tag cloud widget?
On one installation there are missing a lot of them
December 12, 2016 at 8:01 am #722994Hey Guenter,
There is yes, by default it’s set to 45: https://codex.wordpress.org/Function_Reference/wp_tag_cloud
Best regards,
RikardDecember 12, 2016 at 10:19 am #723049aha ok it is set by wordpress – i only looked into enfold options.
But on Enfold the weighting is suppressed. So there has to be an Enfold specific setting. Maybe it is possible to increase the number on that place.Edit: on
function widget($args, $instance) { wp_tag_cloud('smallest=12&largest=24&unit=px&number=0');
i have set it to those args – but is there a way to get it into child-theme setting ?
by the way: i changed it to:
wp_tag_cloud('smallest=12&largest=16&unit=px&number=0');
but it has no influence! ???
- This reply was modified 8 years ago by Guenni007.
December 12, 2016 at 2:58 pm #723141aha – in layout.css there is a rule set to important concerning to font-size of cloud-tag entries.
deleting the !important rule works. i think it will be great if this is by default not set to !important. Those who do not like that weighting – could set an important rule to quick css.Edit The number set to zero means no limit – but no influence on that here ?
December 13, 2016 at 5:16 pm #723836Hi,
Please copy layout.css file into your child theme into a /css/ folder, apply the changes and then add following code to functions.php file of your child theme
add_action( 'wp_enqueue_scripts', 'wp_change_layoutcss', 20 ); function wp_change_layoutcss() { wp_dequeue_style( 'avia-layout' ); wp_enqueue_style( 'avia-layout-child', get_stylesheet_directory_uri().'/css/layout.css' ); }
Best regards,
YigitDecember 13, 2016 at 11:01 pm #724017this is elegant Yigit but the thing is that the number=0 has no influence. And i don’t know why. The number remains 45 (default as in https://codex.wordpress.org/Function_Reference/wp_tag_cloud )
December 13, 2016 at 11:28 pm #724026Hi!
Please try adding following code to Functions.php file in Appearance > Editor
add_filter( 'widget_tag_cloud_args', 'avia_increase_tag_cloud_count' ); function avia_increase_tag_cloud_count($args) { if ( isset($args['taxonomy']) && $args['taxonomy'] == 'post_tag' ){ $args['number'] = 60; } return $args; }
Cheers!
YigitDecember 14, 2016 at 11:09 pm #724627do i need than the class-framework-widget ? : NO
i only have to get rid of this layout.css rule set to importantThanks – as allways !
this works too – because post_tag is an args too and its easier for me to rememberadd_filter( 'widget_tag_cloud_args', 'avia_change_tag_cloud' ); function avia_change_tag_cloud($args) { if ( isset($args['taxonomy'])){ $args['taxonomy'] = 'post_tag'; $args['number'] = 60; $args['smallest'] = 8; $args['largest'] = 20; $args['order'] = 'RAND'; } return $args; }
December 14, 2016 at 11:15 pm #724633 -
AuthorPosts
- You must be logged in to reply to this topic.