New Landing How can we help? Themeforest Theme Support Joyn Tag Cloud Font Size

Viewing 5 posts - 1 through 5 (of 5 total)
  • Posted in: Joyn
  • #192301
    christian_j
    Member
    Post count: 7

    Hello, I’d like my tag cloud widget to display tags in different sizes.

    I’ve alredy modified my functions.php in the child theme

    // Removes sf_tag_cloud_args from the flexform phase
    function remove_add_filter() {
        remove_action('widget_tag_cloud_args','sf_tag_cloud_args' );
    }
    // Call 'remove_add_filter' during WP initialization
    add_action('init','remove_add_filter');
     
    // Add our custom function to the 'flexform' phase
    add_filter( 'widget_tag_cloud_args', 'child_tag_cloud_args' );
     
    function child_tag_cloud_args( $args ) {
     $args['largest'] = 31;
     $args['smallest'] = 14;
     $args['unit'] = 'px';
     $args['format'] = 'list';
     return $args;
    }
     

    The above function seems to work but the problem is that you also setted the size of the tags via css (in the style.css of the main theme folder)

    .widget ul.wp-tag-cloud li > a {font-size:14px!important;}

    My question is how I could “delete” the above mentioned font-size rule without touching the main theme file, in order to display tags with different sizes?

    I tried this in my child theme css

    .widget ul.wp-tag-cloud li > a {font-size:auto!important;}

    But it doesn’t work.

    Could you help me?

    Thanx!

    #192307
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Guess it only works if in your child theme rule you specify the font-size value instead of being auto.

    -Rui

    #192310
    christian_j
    Member
    Post count: 7

    Thanx for your response.

    Basically if i want the cloud tags to be displayed in the way they should work, the only solutions here is to modify the main theme css and do it again and again every theme update.

    Quite annoying but pragmatic.

    #192315
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Not sure if that’s the only way. Will forward the topic to the development team to see if there is an alternative.

    -Rui

    #192376
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Have adjusted our code for the next update – thanks for pointing that out. It will no longer be forced by CSS.

    – Ed

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register