Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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

    #722994

    Hey Guenter,

    There is yes, by default it’s set to 45: https://codex.wordpress.org/Function_Reference/wp_tag_cloud

    Best regards,
    Rikard

    #723049

    aha 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.
    #723141

    aha – 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 ?

    #723836

    Hi,

    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,
    Yigit

    #724017

    this 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 )

    #724026

    Hi!

    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!
    Yigit

    #724627

    do i need than the class-framework-widget ? : NO
    i only have to get rid of this layout.css rule set to important

    Thanks – as allways !
    this works too – because post_tag is an args too and its easier for me to remember

    add_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;
    }
    #724633

    Hi!

    You are welcome @guenni007, always happy to help :)

    Best regards,
    Yigit

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.