WordPress.org

Support

Support » How-To and Troubleshooting » How do I change the font size in my tag cloud?

How do I change the font size in my tag cloud?

  • I saw in another post that I was supposed to edit: wp-includes/widgets.php and where it uses the Template Tag, wp_tag_cloud(), add the smallest, largest, and unit parameters to meet your needs.
    and in another
    To change the font sizes, edit wp-includes/widgets.php using information found at:
    wp_tag_cloud
    basically, you want this:
    wp_tag_cloud(‘smallest=8&largest=22’);
    But I can’t even find where I am supposed to do these things. I looked in my Theme as well, but didn’t see it there (though I was able to change the font size for the text in my general blog posts

    [mod: moved to: ‘How-To and Troubleshooting’]

Viewing 8 replies - 1 through 8 (of 8 total)
  • in your functions.php for your theme, you should be able to do something like:

    apply_filters(‘widget_tag_cloud_args’, array(‘smallest’ => 8,’largest’ => 22))

    @alchymyth said:
    if you are referring to the default ‘tag-cloud’ widget –
    use a filter function added to functions.php of your theme;
    example:

    add_filter(‘widget_tag_cloud_args’,’set_tag_cloud_sizes’);
    function set_tag_cloud_sizes($args) {
    $args = array(‘smallest’ => 8, ‘largest’ => 22);
    return $args;
    }

    Where do I put it? How do I put it?
    Do I just add that to the end of the php list?

    LuckDragon, Where in the functions php would I put that?

    Where in the functions php would I put that?

    anywhere, as long as it does not violate the php syntax and does not break any existing functions;

    for instance right at the end, before the last closing php tag ?> (if one exists)

    yep, just what alchymyth said 🙂

    Thanks 🙂
    I am NOT a programmer in any way shape or form. I have pasted the bottom of that php page, and I would REALLY appreciate it if you would tell me exactly where to put it:

    /**
    * Flush out the transients used in forever_featured_posts()
    */
    function forever_featured_post_checker_flusher() {
    // Vvwooshh!
    delete_transient( ‘featured_posts_with_thumbnail’ );
    }
    add_action( ‘save_post’, ‘forever_featured_post_checker_flusher’ );

    /**
    * This theme was built with PHP, Semantic HTML, CSS, and love.
    */

    there is no “Exactly” as long as it is in that file, anywhere between a <? and a ?> tag, then it should work properly 🙂

    especially since every theme’s functions.php file is different.

    Thank you LuckDragon 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How do I change the font size in my tag cloud?’ is closed to new replies.
Skip to toolbar